[EDT][PATCH] kernel/exit.c : Fix missing read_unlock
From: Maninder Singh
Date: Thu May 21 2015 - 01:00:29 EST
EP-F6AA0618C49C4AEDA73BFF1B39950BAB
Hi,
From: Maninder Singh <maninder1.s@xxxxxxxxxxx>
Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock
This patch adds missing read_unlock if do_wait_thread or ptrace_do_wait
returns non zero.
Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>
Signed-off-by: Vaneet Narang <v.narang@xxxxxxxxxxx>
Reviewd-by: Akhilesh Kumar <akhilesh.k@xxxxxxxxxxx>
---
kernel/exit.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index 22fcc05..31a061f 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1486,12 +1486,16 @@ repeat:
tsk = current;
do {
retval = do_wait_thread(wo, tsk);
- if (retval)
+ if (retval) {
+ read_unlock(&tasklist_lock);
goto end;
+ }
retval = ptrace_do_wait(wo, tsk);
- if (retval)
+ if (retval) {
+ read_unlock(&tasklist_lock);
goto end;
+ }
if (wo->wo_flags & __WNOTHREAD)
break;
--
1.7.1
Thanks
Maninder SinghN‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü¨}©ž²Æ zÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~††Ûiÿûàz¹®w¥¢¸?™¨èÚ&¢)ߢf”ù^jÇ«y§m…á@A«a¶Úÿ0¶ìh®å’i