Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3214130imm; Fri, 10 Aug 2018 05:48:46 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw6L1GiEEE8xFO7HaQh8Rq06IJmD6wImdA++jJXSrsamREvFvcj2YJBR84+4Zv65+tizHSJ X-Received: by 2002:a63:5463:: with SMTP id e35-v6mr6444558pgm.115.1533905326385; Fri, 10 Aug 2018 05:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533905326; cv=none; d=google.com; s=arc-20160816; b=c9RexlNouSjjFyBnWd7hPTuxNGBH3LCyQUtZuxejiHhK4SAbfmeFmxL8y044V0VjGM WBjRGy96oi3I6qapAl5FLdr8gvP/h9cLlB86gjo1iJz6okPuD3871/U53WPR7dKqF2CU enm2iGd6RiLEjoMbf1KTEOBvUvYpSU757RZTzFGdXytsRVyiRzLQYAtcGrlltO+ki1rp GkYTQE1qDoehkJgVGpVt9pG2cYrwoHDXm7GDj4cF/LRuc8F8ObrMPu7umZy8NxoW25Ln yRZs7qD2SExUX+aDaDOulkU7I2gzNr6eDuIJzMqKgxuP8IhT9npAyA1tLBO74JdbZxwK uJEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=IiBgPvaFTVCoUQ128aR2Ra+9mH/8nTDD0Qk93gQN7I8=; b=Pc4EP+LmgPp1jPy/oeNyIWUjzKgqU3EWilGvivVmwNWKvt81lmJv8GB4quJjRktab7 HpNuQjRouvZIgIKfqP9Lv+nfnkzzMBRqVIYAh2jxF3vY+NpbHb8QYdbI+nd9YyZ656Yu BwKljHYB8HaKsowgMaqEl2EpNNp0mUpUgKPEyRSe2zGajO0Sx38qeCqkT9KgBs+fzcnr /sss4MXETR/lMgiXYF9wpAjqFiiq+65uW2Tg3IcmPnQRQPCYIVFHciLvZqYqsYx3X3Gq nZraGfdMGOM42mOcotcryd2jHzuHHYbX7lvXIuJxQK+nwTzNexwpV3SYIb4pyMVeeLyA 6wAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b25-v6si8390864pgf.545.2018.08.10.05.48.16; Fri, 10 Aug 2018 05:48:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728097AbeHJOp3 (ORCPT + 99 others); Fri, 10 Aug 2018 10:45:29 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:47921 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727865AbeHJOp3 (ORCPT ); Fri, 10 Aug 2018 10:45:29 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fo6KZ-0005tL-NU; Fri, 10 Aug 2018 06:15:47 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fo6KU-0006yH-V8; Fri, 10 Aug 2018 06:15:47 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Cc: , , , , , , References: <201808101434273569497@zte.com.cn> Date: Fri, 10 Aug 2018 07:15:28 -0500 In-Reply-To: <201808101434273569497@zte.com.cn> (wen's message of "Fri, 10 Aug 2018 14:34:27 +0800 (CST)") Message-ID: <8736vmto2n.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=1fo6KU-0006yH-V8;;;mid=<8736vmto2n.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/ND/iFoEVJj480kfJIVLHM6tlZzRtfbso= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa08.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01,T_TooManySym_02, XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4994] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa08 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ; X-Spam-Relay-Country: X-Spam-Timing: total 4439 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.9 (0.1%), b_tie_ro: 3.4 (0.1%), parse: 1.02 (0.0%), extract_message_metadata: 13 (0.3%), get_uri_detail_list: 1.84 (0.0%), tests_pri_-1000: 5 (0.1%), tests_pri_-950: 1.08 (0.0%), tests_pri_-900: 0.89 (0.0%), tests_pri_-400: 22 (0.5%), check_bayes: 21 (0.5%), b_tokenize: 6 (0.1%), b_tok_get_all: 8 (0.2%), b_comp_prob: 1.71 (0.0%), b_tok_touch_all: 3.3 (0.1%), b_finish: 0.77 (0.0%), tests_pri_0: 4380 (98.7%), check_dkim_signature: 0.40 (0.0%), check_dkim_adsp: 3.0 (0.1%), tests_pri_500: 8 (0.2%), poll_dns_idle: 1.22 (0.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v6 6/6] signal: Don't restart fork when signals come in. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org writes: > ebiederm@xmission.com writes >> Subject: [PATCH v6 6/6] signal: Don't restart fork when signals come in. >> >> Wen Yang and majiang >> report that a periodic signal received during fork can cause fork to >> continually restart preventing an application from making progress. >> >> ... >> diff --git a/kernel/signal.c b/kernel/signal.c >> index 9f0eafb6d474..cfa9d10e731a 100644 >> --- a/kernel/signal.c >> +++ b/kernel/signal.c >> @@ -1121,6 +1121,21 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, >> out_set: >> signalfd_notify(t, sig); >> sigaddset(&pending->signal, sig); >> + >> + /* Let multiprocess signals appear after on-going forks */ >> + if (type > PIDTYPE_TGID) { >> + struct multiprocess_signals *delayed; >> + hlist_for_each_entry(delayed, &t->signal->multiprocess, node) { >> + sigset_t *signal = &delayed->signal; >> + /* Can't queue both a stop and a continue signal */ >> + if (sig == SIGCONT) >> + sigdelsetmask(signal, SIG_KERNEL_STOP_MASK); >> + else if (sig_kernel_stop(sig)) >> + sigdelset(signal, SIGCONT); >> + sigaddset(signal, sig); >> + } >> + } >> + >> complete_signal(sig, t, type); >> ret: >> trace_signal_generate(sig, info, t, type != PIDTYPE_PID, result); > > I've migrated this patch and try to test it, but I ran into a compile error: > > kernel/signal.c: In function '__send_signal': > kernel/signal.c:1192:9: error: 'type' undeclared (first use in this function) > if (type > PIDTYPE_TGID) { > ^ > We may also need some patches, which pass pid type into > __send_signal. We most definitely need the the first 15 patches from my last series of patches that push the pid type down. I did not repeat them here because there is consensus that they are fine working fine. I have a branch with everything at: https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-testing Eric