On Sat, 26 Apr 2025 14:08:46 +0300
Borislav Petkov <[email protected]> wrote:

> >+static __always_inline bool is_kernel_thread(struct task_struct *task)
> >+{
> >+    return task->flags & PF_KTHREAD;  
> 
> return !is_user_thread(task);
> 
> or the other way around. 

Yeah, I thought about doing that but decided against it.

As Kees mentioned to use !!, I think using the !is_user_thread() is a
better approach.

-- Steve

Reply via email to