From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB41AECDFB0 for ; Fri, 13 Jul 2018 14:51:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8465520873 for ; Fri, 13 Jul 2018 14:51:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8465520873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xmission.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729765AbeGMPGe (ORCPT ); Fri, 13 Jul 2018 11:06:34 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:41014 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729647AbeGMPGe (ORCPT ); Fri, 13 Jul 2018 11:06:34 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fdzPz-0005g0-Cg; Fri, 13 Jul 2018 08:51:35 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fdzPy-0007Pp-P3; Fri, 13 Jul 2018 08:51:35 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Oleg Nesterov Cc: Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Wen Yang , majiang References: <877em2jxyr.fsf_-_@xmission.com> <20180711024459.10654-11-ebiederm@xmission.com> <20180711141456.GA6636@redhat.com> Date: Fri, 13 Jul 2018 09:51:28 -0500 In-Reply-To: <20180711141456.GA6636@redhat.com> (Oleg Nesterov's message of "Wed, 11 Jul 2018 16:14:56 +0200") Message-ID: <87y3efxk7j.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1fdzPy-0007Pp-P3;;;mid=<87y3efxk7j.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX192XaCVIPwqF4bnEw8oWOlmPfc/22LiFN8= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [RFC][PATCH 11/11] signal: Ignore all but multi-process signals that come in during fork. X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov writes: > That is why I tried to sugest another approach. copy_process() should always fail > if signal_pending() == T, just the "real" signal should not disturb the forking > thread unless the signal is fatal or multi-process. I understand now why you are suggesting another approach. There are lot of cases that could be affected by the removal of "if (signal_pending()) return restart_syscall();" in copy_process. I just shiver at the thought of leaving the code that way. That is just leaving a mess for later and the signal handling code already has way too many of those. So I am going to try and work through all of the cases. I might even implement queueing shared signals for after the fork. As it is looking increasingly less difficult. Eric