]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commitab52ab4790ed3aab8bc471e8a1f83962387fe818
tree2404fc0d346127b71b9c30d9f9c95603c652ac93
parent2e5ef0a5d3493ef935315f554e1df06ba6a91527
[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