mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Dhaval Giani <dhaval.giani@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 30/28] kernel/user.c: add lock release annotation on free_user()
Date: Fri, 11 Feb 2011 07:07:01 +0100	[thread overview]
Message-ID: <1297404421.7865.24.camel@marge.simson.net> (raw)
In-Reply-To: <AANLkTimbHE9H5_vmS3=L84z=OkL0GNAxg4xOUjnco5SL@mail.gmail.com>

On Thu, 2011-02-10 at 19:35 +0100, Dhaval Giani wrote:
> >
> > There were a few more patches after this which cleaned up a few things
> > as well. Let me search them out and let you know the commit IDs.
> >

> 571428be550fbe37160596995e96ad398873fcbd

From: Namhyung Kim <namhyung@gmail.com>
Date: Tue, 26 Oct 2010 14:22:43 -0700
Subject: 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>
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>

---
 kernel/user.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/user.c b/kernel/user.c
index 8e1c8c0..1b91701 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);



  parent reply	other threads:[~2011-02-11  6:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10  8:48 [PATCH 01/28] sched: Remove USER_SCHED stable-bot for Dhaval Giani
2011-02-10 18:30 ` Dhaval Giani
2011-02-10 18:35   ` Dhaval Giani
2011-02-11  6:04     ` [PATCH 29/28] sched: Remove some dead code Mike Galbraith
2011-02-15 22:51       ` Patch "sched: Remove some dead code" has been added to the 2.6.32-longterm tree gregkh
2011-02-11  6:07     ` Mike Galbraith [this message]
2011-02-15 22:51       ` Patch "kernel/user.c: add lock release annotation on free_user()" " gregkh
2011-02-11  6:08     ` [PATCH 01/28] sched: Remove USER_SCHED Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297404421.7865.24.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dhaval.giani@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®