Skip to contentSkip to conversation

exit: add lock context annotation on find_new_reaper()

PATCH In review Namhyung Kim 2 participants 2 messages Sep 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exit: add lock context annotation on find_new_reaper()

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

---
 kernel/exit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/exit.c +2 -0
index 0312022..d31385b 100644
@@ -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;
Signature · 1 line
1.7.2.2