mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] exit: add lock context annotation on find_new_reaper()
@ 2010-09-07 12:35 Namhyung Kim
  2010-09-07 19:02 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2010-09-07 12:35 UTC (permalink / raw)
  To: Andrew Morton, Oleg Nesterov, Roland McGrath; +Cc: linux-kernel

find_new_reaper() releases and regrabs tasklist_lock but was missing
proper annotations. Add it. This remove following sparse warning:

 warning: context imbalance in 'find_new_reaper' - unexpected unlock

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 kernel/exit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 0312022..d31385b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -702,6 +702,8 @@ static void exit_mm(struct task_struct * tsk)
  * space.
  */
 static struct task_struct *find_new_reaper(struct task_struct *father)
+	__releases(&tasklist_lock)
+	__acquires(&tasklist_lock)
 {
 	struct pid_namespace *pid_ns = task_active_pid_ns(father);
 	struct task_struct *thread;
-- 
1.7.2.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] exit: add lock context annotation on find_new_reaper()
  2010-09-07 12:35 [PATCH] exit: add lock context annotation on find_new_reaper() Namhyung Kim
@ 2010-09-07 19:02 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2010-09-07 19:02 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Andrew Morton, Oleg Nesterov, linux-kernel

Acked-by: Roland McGrath <roland@redhat.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-07 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 12:35 [PATCH] exit: add lock context annotation on find_new_reaper() Namhyung Kim
2010-09-07 19:02 ` Roland McGrath

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®