Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755429AbbEVDgz (ORCPT ); Thu, 21 May 2015 23:36:55 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:53905 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753397AbbEVDgx (ORCPT ); Thu, 21 May 2015 23:36:53 -0400 X-AuditID: cbfee691-f79ca6d00000456a-7e-555ea4530892 Date: Fri, 22 May 2015 03:36:51 +0000 (GMT) From: Maninder Singh Subject: Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock To: Oleg Nesterov Cc: "akpm@linux-foundation.org" , "mhocko@suse.cz" , "peterz@infradead.org" , "mingo@kernel.org" , "riel@redhat.com" , "ionut.m.alexa@gmail.com" , "peter@hurleysoftware.com" , "linux-kernel@vger.kernel.org" Reply-to: maninder1.s@samsung.com MIME-version: 1.0 X-MTR: 20150522033159026@maninder1.s Msgkey: 20150522033159026@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: 20150522033159026@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: <698657669.25971432265807247.JavaMail.weblogic@epmlwas06d> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKIsWRmVeSWpSXmKPExsWyRsSkRjd4SVyowcW9ihaXd81hc2D0+LxJ LoAxissmJTUnsyy1SN8ugStjw+EmtoJ1PBWL751ma2Bs4Oli5OQQElCTWLT3MRuILSFgInH+ 3j1GCFtM4sK99UBxLqCapYwSfV/uMMMU/Zu3iBUiMYdRomHNZLAOFgFViSurb7OD2GwC+hJn 964DauDgEBZwlLh6TgMkLAJU8r/pKiNIL7PAJGaJWa8vM0NcoSix/sYTsDm8AoISJ2c+YYFY pi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vmBB1A1fBJrFr5lganfdWo5 M8yu+1vmQvVKSGxteQJ2DzPQ/VO6H7JD2AYSRxbNYUX1CweQ7SZx8B3LBEbZWUgys5B0z0LS jaxmASPLKkbR1ILkguKk9AoTveLE3OLSvHS95PzcTYzgNPRsyQ7GhgvWhxgFOBiVeHg51GND hVgTy4orcw8xSnAwK4nwqi6ICxXiTUmsrEotyo8vKs1JLT7EaAqMtInMUqLJ+cAUmVcSb2hs Ym5qbGphYGhubqYkzvv/XG6IkEB6YklqdmpqQWoRTB8TB6dUA+PMq+bb7uxJiFIsfSecnHLg 5PQ0X6fHdftkSlNvzZgo3/WrtvnnhWeXNQIDSz9cqHXY/nhKEV8Qx7mJP0yvzwgW2pFYv3qm 0aaz594FH/zNNivFK8jFkunWl3UnHx9euCDa0eiOxj5dhSNrI6/M6czd931XpuC6MwwKQgsa Qn//WLQ1eLFUfJSrEktxRqKhFnNRcSIAL2cKg1kDAAA= 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 t4M3b1ha024028 Content-Length: 1262 Lines: 49 EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi Oleg, >> Hi, >> >> From: Maninder Singh >> >> 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. > >Confused... > >wait_consider_task() should drop tasklist_lock if it returns non-zero? > > >> --- 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; >> + } > >Well, the patch is obviously wrong. Because, again, tasklist_lock was >already unlocked if (say) wait_task_zombie() reaps a child. Yes, agree, My wrong >If you think there is a case which forgets to unlock, please tell us >more. I have checked It is getting unlocked in wait_task_zombie Sorry for unnecessary disturbance. >Oleg. Thanks ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?