Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756966Ab1BPBwy (ORCPT ); Tue, 15 Feb 2011 20:52:54 -0500 Received: from kroah.org ([198.145.64.141]:51388 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758667Ab1BPBwS (ORCPT ); Tue, 15 Feb 2011 20:52:18 -0500 X-Mailbox-Line: From gregkh@clark.kroah.org Tue Feb 15 17:47:05 2011 Message-Id: <20110216014705.757486691@clark.kroah.org> User-Agent: quilt/0.48-11.2 Date: Tue, 15 Feb 2011 17:46:21 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, Dhaval Giani Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Namhyung Kim , Ingo Molnar , Mike Galbraith Subject: [115/115] kernel/user.c: add lock release annotation on free_user() In-Reply-To: <20110216014741.GA24678@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 45 2.6.32-longterm review patch. If anyone has any objections, please let us know. ------------------ From: Namhyung Kim 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 Cc: Ingo Molnar Cc: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Mike Galbraith Signed-off-by: Greg Kroah-Hartman --- kernel/user.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/user.c +++ b/kernel/user.c @@ -91,6 +91,7 @@ static struct user_struct *uid_hash_find * 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/