keys: fix an RCU warning
authorDavid Howells <dhowells@redhat.com>
Fri, 23 Apr 2010 17:18:00 +0000 (13:18 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Apr 2010 18:31:25 +0000 (11:31 -0700)
commit93b4a44f3ad69520d605aace3f3486b8eb754b96
tree8eb946db950ccc6aee1d00b226739f44141dd310
parentccdb40048b2972f10bdc944913c0e0ee26b5d1f2
keys: fix an RCU warning

Fix the following RCU warning:

  ===================================================
  [ INFO: suspicious rcu_dereference_check() usage. ]
  ---------------------------------------------------
  security/keys/request_key.c:116 invoked rcu_dereference_check() without protection!

This was caused by doing:

[root@andromeda ~]# keyctl newring fred @s
539196288
[root@andromeda ~]# keyctl request2 user a a 539196288
request_key: Required key not available

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/keys/request_key.c