original_kernel/security/keys
David Howells 9ad0830f30 [PATCH] Keys: Fix key serial number collision handling
Fix the key serial number collision avoidance code in key_alloc_serial().

This didn't use to be so much of a problem as the key serial numbers were
allocated from a simple incremental counter, and it would have to go through
two billion keys before it could possibly encounter a collision.  However, now
that random numbers are used instead, collisions are much more likely.

This is fixed by finding a hole in the rbtree where the next unused serial
number ought to be and using that by going almost back to the top of the
insertion routine and redoing the insertion with the new serial number rather
than trying to be clever and attempting to work out the insertion point
pointer directly.

This fixes kernel BZ #7727.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-06 14:45:00 -08:00
..
Makefile
compat.c
internal.h
key.c [PATCH] Keys: Fix key serial number collision handling 2007-02-06 14:45:00 -08:00
keyctl.c
keyring.c [PATCH] security/keys/*: user kmemdup() 2006-12-07 08:39:25 -08:00
permission.c
proc.c
process_keys.c [PATCH] lockdep: name some old style locks 2006-12-07 08:39:36 -08:00
request_key.c
request_key_auth.c
user_defined.c