* [PATCH] kernel/user.c: add lock release annotation on free_user()
@ 2010-09-27 8:01 Namhyung Kim
0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2010-09-27 8:01 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar; +Cc: Dhaval Giani, linux-kernel
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>
---
kernel/user.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/user.c b/kernel/user.c
index 7e72614..2c7d8d5 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);
--
1.7.2.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-27 8:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-27 8:01 [PATCH] kernel/user.c: add lock release annotation on free_user() Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®