Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbdHOQRB (ORCPT ); Tue, 15 Aug 2017 12:17:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47288 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbdHOQRA (ORCPT ); Tue, 15 Aug 2017 12:17:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0D1A57ACAB Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Tue, 15 Aug 2017 18:16:58 +0200 From: Oleg Nesterov To: Jamie Iles Cc: linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH] signal: don't remove SIGNAL_UNKILLABLE for traced tasks. Message-ID: <20170815161658.GA1344@redhat.com> References: <20170815112806.10728-1-jamie.iles@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170815112806.10728-1-jamie.iles@oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 15 Aug 2017 16:17:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 643 Lines: 19 On 08/15, Jamie Iles wrote: > > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -1194,7 +1194,11 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) > recalc_sigpending_and_wake(t); > } > } > - if (action->sa.sa_handler == SIG_DFL) > + /* > + * Don't clear SIGNAL_UNKILLABLE for traced tasks, users won't expect > + * debugging to leave init killable. > + */ > + if (action->sa.sa_handler == SIG_DFL && !t->ptrace) > t->signal->flags &= ~SIGNAL_UNKILLABLE; > ret = specific_send_sig_info(sig, info, t); > spin_unlock_irqrestore(&t->sighand->siglock, flags); Acked-by: Oleg Nesterov