[PATCH] Keys: Improve usage of memory barriers and remove IRQ disablement
authorDavid Howells <dhowells@redhat.com>
Tue, 11 Apr 2006 05:54:26 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:45 +0000 (06:18 -0700)
commit1a26feb9622f1b1bc5e4f5f60f65557b73c38cbf
tree2404fc0d346127b71b9c30d9f9c95603c652ac93
parent25a80759c5c237f0ecf57eb11fdd4efb21079c88
[PATCH] Keys: Improve usage of memory barriers and remove IRQ disablement

Remove an unnecessary memory barrier (implicit in rcu_dereference()) from
install_session_keyring().

install_session_keyring() is also rearranged a little to make it slightly
more efficient.

As install_*_keyring() may schedule (in synchronize_rcu() or
keyring_alloc()), they may not be entered with interrupts disabled - and so
there's no point saving the interrupt disablement state over the critical
section.

exec_keys() will also be invoked with interrupts enabled, and so that doesn't
need to save the interrupt state either.

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