]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
Fix recursive lock in free_uid()/free_user_ns()
authorDavid Howells <dhowells@redhat.com>
Fri, 27 Feb 2009 22:03:03 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 28 Feb 2009 00:26:21 +0000 (16:26 -0800)
commit5170836679185357dc1b7660bad13287b39e1e33
tree0b470820e11df7c7eef7e3161657aefe90c7c35e
parent8ca2f156b06bdcbfd1ab543355279246d05e2499
Fix recursive lock in free_uid()/free_user_ns()

free_uid() and free_user_ns() are corecursive when CONFIG_USER_SCHED=n,
but free_user_ns() is called from free_uid() by way of uid_hash_remove(),
which requires uidhash_lock to be held.  free_user_ns() then calls
free_uid() to complete the destruction.

Fix this by deferring the destruction of the user_namespace.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/user_namespace.h
kernel/user_namespace.c