+ kernel-userc-add-lock-release-annotation-on-free_user.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     kernel/user.c: add lock release annotation on free_user()
has been added to the -mm tree.  Its filename is
     kernel-userc-add-lock-release-annotation-on-free_user.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: kernel/user.c: add lock release annotation on free_user()
From: Namhyung Kim <namhyung@xxxxxxxxx>

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@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Dhaval Giani <dhaval.giani@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

diff -puN kernel/user.c~kernel-userc-add-lock-release-annotation-on-free_user kernel/user.c
--- a/kernel/user.c~kernel-userc-add-lock-release-annotation-on-free_user
+++ a/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);
_

Patches currently in -mm which might be from namhyung@xxxxxxxxx are

linux-next.patch
init-mark-__user-address-space-on-string-literals.patch
kernel-userc-add-lock-release-annotation-on-free_user.patch
printk-fixup-declaration-of-kmsg_reasons.patch
printk-add-lock-context-annotation.patch
printk-change-type-of-boot_delay-to-int.patch
printk-declare-printk_ratelimit_state-in-ratelimith.patch
printk-declare-printk_ratelimit_state-in-ratelimith-fix.patch
exit-add-lock-context-annotation-on-find_new_reaper.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux