lkml.org 
[lkml]   [2003]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[patch] Fix -EPERM returned by kernel_thead() if traced...
Bernhard Kaindl wrote:

> - task_lock(task);
> - if (task->ptrace) {
> - task_unlock(task);
> - return -EPERM;
> - }
> -
> old_task_dumpable = task->task_dumpable;
> + /* prevent ptrace_attach() on the new task: */
> task->task_dumpable = 0;
> - task_unlock(task);

Is it safe to remove the task_lock()?


> So I really have to assume that CLONE_PTRACE is never passed
> to create a kernel thread. If you are paranoid, you could just
> unmask it in kernel_thread() if you want.

I would mask it if it's a possible problem. Someone might
try to pass that option in future code...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.023 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site