Re: [PATCH] do_sched_setscheduler: don't take tasklist_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux