Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753731AbbEUGe0 (ORCPT ); Thu, 21 May 2015 02:34:26 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:57102 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbbEUGeX (ORCPT ); Thu, 21 May 2015 02:34:23 -0400 X-AuditID: cbfee68d-f79106d00000728c-ac-555d7c6b0159 Date: Thu, 21 May 2015 06:34:16 +0000 (GMT) From: Maninder Singh Subject: Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock To: Ingo Molnar Cc: "akpm@linux-foundation.org" , "oleg@redhat.com" , "mhocko@suse.cz" , "peterz@infradead.org" , "riel@redhat.com" , "ionut.m.alexa@gmail.com" , "peter@hurleysoftware.com" , "linux-kernel@vger.kernel.org" , Vaneet Narang , AKHILESH KUMAR , Peter Zijlstra Reply-to: maninder1.s@samsung.com MIME-version: 1.0 X-MTR: 20150521062257675@maninder1.s Msgkey: 20150521062257675@maninder1.s X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150521062257675@maninder1.s X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <2047279741.513261432190052483.JavaMail.weblogic@ep2mlwas07b> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsWyRsSkTjenJjbU4OArJovLu+awOTB6fN4k F8AYxWWTkpqTWZZapG+XwJXR8GAXY8ED0Yp/a5eyNDBOEe1i5OQQElCTWLT3MRuILSFgInFi 7j5WCFtM4sK99UBxLqCapYwSn3bdZIEp6l37nBUiMYdR4trDfrAOFgFViWf3NoAVsQnoS5zd u465i5GDQ1jAUeLqOQ2QsIiAisShG6tYQHqZBaaw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/7+GCrOL3Hs9g6oXgGJqWcOQtVoSqzYtxJqPp/EmoVvWWDqd51a zgyz6/6WuVC9EhJbW56A/c4MdP+U7ofsELaBxJFFc1jR/cIr4Clx+fcH9gmMsrOQpGYhaZ+F pB1ZzQJGllWMoqkFyQXFSekVRnrFibnFpXnpesn5uZsYwYno2aIdjP/OWx9iFOBgVOLh5VCP DRViTSwrrsw9xCjBwawkwpsTDRTiTUmsrEotyo8vKs1JLT7EaAqMtYnMUqLJ+cAkmVcSb2hs Ym5qbGphYGhubqYkzvv/XG6IkEB6YklqdmpqQWoRTB8TB6dUA+NLncceRQsX1fw4+ibk24uT GyM9Bd0Up65eEx/NzGmh/FvuJaO8WcV96ScXZd/KLFa0uXjIac6iLrGiWddcVuicXHCRW2HG gjf1oka/mbmUnxf9MvzrPEHcLZVvm+O8Fj27j5KaQrNn2ni3T9lz/ZebNefBaY1nLQM2h9ZM VTX8pTZl7nE9+31KLMUZiYZazEXFiQCt8E9ZWgMAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t4L6YV0x017040 Content-Length: 2119 Lines: 71 EP-F6AA0618C49C4AEDA73BFF1B39950BAB >> Hi, >> >> From: Maninder Singh >> >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing read_unlock >> This patch adds missing read_unlock if do_wait_thread or ptrace_do_wait >> returns non zero. Reported By Prevent Under Missing unlock category(program hangs):- missing_unlock: returning without unlocking tasklist_lock >> >> Signed-off-by: Maninder Singh >> Signed-off-by: Vaneet Narang >> Reviewd-by: Akhilesh Kumar >> --- >> 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; > >That's surprising and the changelog is lacking. >So the last time that code was touched upstream was 7 years ago: > commit 64a16caf5e3417ee32f670debcb5857b02a9e08e > Author: Oleg Nesterov > Date: Wed Jun 17 16:27:40 2009 -0700 > do_wait: simplify retval/tsk_result/notask_error mess >please explain whether what you fix is: > 1) an ancient bug that somehow nobody ever triggered (plus analysis > of why it wasn't triggered) > 2) a new bug introduced by commit XYZ (plus analysis) > 3) something else This issue is reported by Prevent Under category Missing Unlock, So we think it should be reported to maintainers. >Thanks, > Ingo Thanks.????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?