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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Jens Axboe <axboe@kernel.dk> writes:


From this thread I gather the following changes are being proposed:

a) my original report added rcu_read_lock() to sys_ioprio_get() and
   claims that "something" is needed in sys_ioprio_set().

c) http://lkml.org/lkml/2010/10/29/168 added rcu locks to both
   sys_ioprio_get() and sys_ioprio_set() thus addressing the issues
   raised in a).  However, I do not see this patch in -mm.

   I just retested and confirmed that this warning still exists in
   unmodified mmotm-2010-11-09-15-31:
     Call Trace:
      [<ffffffff8109befc>] lockdep_rcu_dereference+0xaa/0xb3
      [<ffffffff81088aaf>] find_task_by_pid_ns+0x44/0x5d
      [<ffffffff81088aea>] find_task_by_vpid+0x22/0x24
      [<ffffffff81155ad2>] sys_ioprio_set+0xb4/0x29e
      [<ffffffff81476819>] ? trace_hardirqs_off_thunk+0x3a/0x3c
      [<ffffffff8105c409>] sysenter_dispatch+0x7/0x2c
      [<ffffffff814767da>] ? trace_hardirqs_on_thunk+0x3a/0x3f

   I can resubmit my patch, but want to know if there is a reason that
   http://lkml.org/lkml/2010/10/29/168 did not make it into either -mm
   or linux-next?

d) the sys_ioprio_set() comment indicating that "we can't use
   rcu_read_lock()" needs to be updated to be more clear.  I'm not sure
   what this should be updated to, which leads into the next
   sub-topic...

e) possibly removing tasklist_lock, though there seems to be some
   concern that this might introduce task->io_context usage race.  I
   think Jens is going to address this issue.

--
Greg
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: INFO: suspicious rcu_dereference_check() usage - kern ..., Greg Thelen, (Thu Nov 11, 12:45 pm)