lkml.org 
[lkml]   [2008]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] signal, procfs: lock_task_sighand() do not need rcu_read_lock()
On 10/03, Lai Jiangshan wrote:
>
> lock_task_sighand() make sure task->sighand is being protected,
> so we do not need rcu_read_lock().
> [ exec() will get task->sighand->siglock before change task->sighand! ]
>
> But code using rcu_read_lock() _just_ to protect lock_task_sighand()
> only appear in procfs. (and some code in procfs use lock_task_sighand()
> without such redundant protection.)

Yes, the patch looks correct.

The initial implementaion of lock_task_sighand() did not take RCU lock,
that is why we still have the callers which call rcu_read_lock().
See 1406f2d321bae5ac5ff729dcb773336d9c05ec74.

Thanks!

Oleg.



\
 
 \ /
  Last update: 2008-10-03 18:25    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site