From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753758AbdBTPiG (ORCPT ); Mon, 20 Feb 2017 10:38:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49450 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753995AbdBTPiE (ORCPT ); Mon, 20 Feb 2017 10:38:04 -0500 Date: Mon, 20 Feb 2017 16:36:30 +0100 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Andrew Morton , Mika =?iso-8859-1?Q?Penttil=E4?= , Aleksa Sarai , Andy Lutomirski , Attila Fazekas , Jann Horn , Kees Cook , Michal Hocko , Ulrich Obergfell , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/2] exec: don't wait for zombie threads with cred_guard_mutex held Message-ID: <20170220153629.GA13975@redhat.com> References: <20170213141452.GA30203@redhat.com> <20170213141516.GA30233@redhat.com> <20170213180454.GA2858@redhat.com> <87zihmpdkf.fsf@xmission.com> <20170220152202.GA13726@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170220152202.GA13726@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 20 Feb 2017 15:38:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20, Oleg Nesterov wrote: > > Again, this needs some work. For example check_unsafe_exec() assumes > it can't race with another thread, see 9e00cdb091b008cb3c78192651180 > "exec:check_unsafe_exec: kill the dead -EAGAIN and clear_in_exec logic". > But this looks solvable. Forgot to mention... plus check_unsafe_exec() checks ptrace, this is another reason why we can't simply shift mutex_lock(cred_guard_mutex) later. Oleg.