lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [109/275] kernel/user.c: add lock release annotation on free_user()
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Namhyung Kim <namhyung@gmail.com>

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>


---
kernel/user.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6.35.y/kernel/user.c
===================================================================
--- linux-2.6.35.y.orig/kernel/user.c 2011-03-29 22:51:25.263076751 -0700
+++ linux-2.6.35.y/kernel/user.c 2011-03-29 23:03:00.463288316 -0700
@@ -91,6 +91,7 @@
* 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);

\
 
 \ /
  Last update: 2011-03-30 23:51    [W:1.013 / U:5.660 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site