]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Keys: Use RCU to manage session keyring pointer
authorDavid Howells <dhowells@redhat.com>
Fri, 24 Jun 2005 05:00:53 +0000 (22:00 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 07:05:18 +0000 (00:05 -0700)
commita316659f007c0f6acd3316da3450fc23ab78de74
treed53c9b43ee0aaa2d7518a023c4b6373422117506
parent2a27ef1e9162e59e8b71e2412ccacb63b6cf0242
[PATCH] Keys: Use RCU to manage session keyring pointer

The attached patch uses RCU to manage the session keyring pointer in struct
signal_struct.  This means that searching need not disable interrupts and get
a the sighand spinlock to access this pointer.  Furthermore, by judicious use
of rcu_read_(un)lock(), this patch also avoids the need to take and put
refcounts on the session keyring itself, thus saving on even more atomic ops.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
security/keys/process_keys.c
security/keys/request_key.c