summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-02-11 07:07:01 +0100
committerAK <andi@firstfloor.org>2011-03-31 11:58:02 -0700
commitcec5d24f1ce6c52f5d2ed93b845e0de40127c88c (patch)
tree3ee28a697a63a24643973b76f1e8a75d188740ea /kernel
parent118de48b5183dbb3d6281302528ad1a93624854f (diff)
kernel/user.c: add lock release annotation on free_user()
commit 571428be550fbe37160596995e96ad398873fcbd upstream. free_user() releases uidhash_lock but was missing annotation. Add it. This removes following sparse warnings: include/linux/spinlock.h:339:9: warning: context imbalance in 'free_user' - unexpected unlock kernel/user.c:120:6: warning: context imbalance in 'free_uid' - wrong count at exit Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Dhaval Giani <dhaval.giani@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/user.c b/kernel/user.c
index 8ce395f74d47..5c598ca781df 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -91,6 +91,7 @@ static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)
* upon function exit.
*/
static void free_user(struct user_struct *up, unsigned long flags)
+ __releases(&uidhash_lock)
{
uid_hash_remove(up);
spin_unlock_irqrestore(&uidhash_lock, flags);