lkml.org 
[lkml]   [2006]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] do_sched_setscheduler: don't take tasklist_lock
On 08/13, Oleg Nesterov wrote:
>
> We don't need to take tasklist_lock or disable irqs for
> find_task_by_pid() + get_task_struct(). Use RCU locks
> instead.

On the other hand, I think sched_setscheduler() does need tasklist_lock!

It is unsafe do dereference ->signal unless tasklist_lock or ->siglock
is held (or p == current). Yes, we pin the task structure, but this can't
prevent from release_task()->__exit_signal() which sets ->signal = NULL.

So, I think this patch

[PATCH] Drop tasklist lock in do_sched_setscheduler
commit e74c69f46d93d29eea0ad8647863d1c6488f0f55

is not correct.

Am I missed something?

Oleg.

-
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: 2006-08-13 15:01    [W:0.026 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site