include/linux/cgroup.h:553 suspicious rcu_dereference_check() usage!

From: Jiri Slaby
Date: Fri Sep 14 2012 - 05:23:20 EST


with current -next trees and LDEP enabled, I'm getting:
[ INFO: suspicious RCU usage. ]
3.6.0-rc5-next-20120913+ #42 Not tainted
/home/latest/linux/include/linux/cgroup.h:553 suspicious
rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
2 locks held by kdevtmpfs/23:
#0: (sb_writers){.+.+.+}, at: [<ffffffff8116873f>]
#1: (&sb->s_type->i_mutex_key#3/1){+.+.+.}, at: [<ffffffff811558af>]

stack backtrace:
Pid: 23, comm: kdevtmpfs Not tainted 3.6.0-rc5-next-20120913+ #42
Call Trace:
[<ffffffff810c638d>] lockdep_rcu_suspicious+0xfd/0x130
[<ffffffff8121541d>] devcgroup_inode_mknod+0x19d/0x240
[<ffffffff8107bf54>] ? ns_capable+0x44/0x80
[<ffffffff81156b21>] vfs_mknod+0x71/0xf0
[<ffffffff813a8332>] handle_create.isra.2+0x72/0x200
[<ffffffff813a85d4>] devtmpfsd+0x114/0x140
[<ffffffff813a84c0>] ? handle_create.isra.2+0x200/0x200
[<ffffffff81093ad6>] kthread+0xd6/0xe0
[<ffffffff81654f24>] kernel_thread_helper+0x4/0x10
[<ffffffff8165369d>] ? retint_restore_args+0xe/0xe
[<ffffffff81093a00>] ? kthread_create_on_node+0x140/0x140
[<ffffffff81654f20>] ? gs_change+0xb/0xb

It's due to the commit "device_cgroup: convert device_cgroup internally
to policy + exceptions". It removed rcu locks which are needed in
task_devcgroup called in this chain: devcgroup_inode_mknod OR
__devcgroup_inode_permission -> __devcgroup_inode_permission ->
task_devcgroup -> task_subsys_state -> task_subsys_state_check.

suse labs
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at