Re: INFO: suspicious rcu_dereference_check() usage - kernel/pid.c:419 invoked rcu_dereference_check() without protection!

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

 



On 2010-11-10 17:02, Oleg Nesterov wrote:
> (another try with the proper email address)
> 
> On 11/09, Paul E. McKenney wrote:
>>
>> Thank you, Oleg!  Greg, would you be willing to update your patch
>> to remove the comment?  (Perhaps tasklist_lock as well...)
> 
> Agreed, I think tasklock should be killed.
> 
> 
> But wait. Whatever we do, isn't this code racy? I do not see why, say,
> sys_ioprio_set(IOPRIO_WHO_PROCESS) can't install ->io_context after
> this task has already passed exit_io_context().
> 
> Jens, am I missed something?

Not sure, I think the original intent was for the tasklist_lock to
protect from a concurrent exit, but that looks like nonsense and it was
just there to protect the task lookup.

How about moving the ->io_context check and exit_io_context() in
do_exit() under the task lock? Coupled with a check for PF_EXITING in
set_task_ioprio().


-- 
Jens Axboe

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]