Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp24897imm; Tue, 24 Jul 2018 13:16:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfYL+Sgtc9Ascj67VOIqvOb9yregUN+kOCjojhh1F9uFdOR3T3PadldW3BYrIRGA7fY7Tla X-Received: by 2002:a65:620b:: with SMTP id d11-v6mr17888933pgv.429.1532463416848; Tue, 24 Jul 2018 13:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532463416; cv=none; d=google.com; s=arc-20160816; b=wk/h3Yz9KQZW6qNOs2j5v8saNubugFGH/WICZPxCw2I316A8b6pq2natOtqyMPE6t+ M8xEIwHKhCUIxhRQnJ06+eMGKjsQwpR3+NS/l70ei7bJjprXyMsoJPtsXulhWy05jiaD o2q8YnqOsma28LnuZZt0C66wC3VB4z4BgZ/cHzxnYDUtLUkELuqISCxfepRpPYYmTu8N 5Gt1l3i50qF8s0AwilemHuEb6w5mLJgL1CskxYVP1h/6vSiW4DRXpZ/Ospr4UnFsp+N1 FGVwMs/wBKOrTssDBO0mIFeVXay7aj0DBjR0BqBo3hBVlco8ADNTqBLbkgTacEYBUH2o PXFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=zo7XnMWTxi4YeBD5KPxlewi1K4MoMVrxTyT2Ix1c2Fs=; b=tNXj3P7C3VS37PTbvYP33Cz2i/u3vcbpTBHTDF93C72JHanlPjJB6H91Dc6mUQaw8y G2q8czDO7EAXkRPzuJtzPYkzNkkI9z8G6SIP+Igku+ZJ96sqQB3salcHzq/xRhGyWips B2wGlvc32ri6rBHKv309giXQNxrlzqlu3PuLMSvHXBeKRueqV3cAyaqVARVdXT6rj1i9 3l3Z0hzsq4JqqihQX90K8EthbnD7Es3gCJH0OnWCMAndtrwnK224RxgOQxNDDxgX71+g CdHjxAU6FdVgZngu49zSk4tU3ZAWiotQtjmPtqbPN3PtBACNDEV9q9unHP/GwCkXdz4R kHeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="I/5ZrLKC"; 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 c192-v6si12010765pfg.347.2018.07.24.13.16.35; Tue, 24 Jul 2018 13:16:56 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="I/5ZrLKC"; 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 S2388685AbeGXVXk (ORCPT + 99 others); Tue, 24 Jul 2018 17:23:40 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:55395 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388476AbeGXVXk (ORCPT ); Tue, 24 Jul 2018 17:23:40 -0400 Received: by mail-it0-f67.google.com with SMTP id 16-v6so5544110itl.5 for ; Tue, 24 Jul 2018 13:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zo7XnMWTxi4YeBD5KPxlewi1K4MoMVrxTyT2Ix1c2Fs=; b=I/5ZrLKC007APqKEM3sqFGtRdHTueykvFq4sAPTln5+PXccRmU3f3S/ctbcGctgWCU sUrBx3z4F/LeXRaVJtQL5ydSaMDzOnNtW2/+z+nLd36yvNBy2Czd4lrZTY0xbIMa++Fo ZFhavEqTZXFt43ERnCPj+hMyHa+DJ0GtZv8A8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zo7XnMWTxi4YeBD5KPxlewi1K4MoMVrxTyT2Ix1c2Fs=; b=nKSTPcZAUHfkCzmGAy3wdGPiHs52gg0GjOPWlOjCPcimK7zTGlGJVyqEh4/sf/YQ/d BDujwgYp2v/JXyDPI6/MV0qBMyMZabIjt0+VYWkdSLfslMSRlEW/fOzn2ZUpmlj/vLZW 9FzjR5gcXbY/pFr2gZT/d7HbtUWmTR2UsPqgGZUT/8IkmYZxCMShIV4O2NPNoAqXQy5c 7tKn3Mm7XN/QAPjKiDCFsXV3e4tsmXM+Mv9vrB9XSL7xtPiaX0iR914zQOHw1qAsWxTU zAQiYCtHJNHKDoag4kFg6JS5xrmCKOVYb/RjUDPugBMyrTrsi5C/tuMhXktumnl5TdeO pomQ== X-Gm-Message-State: AOUpUlG7qOHSGBs5qfW2gyNNXLDpfnOGqfDImMw44Ujt1cVs1FKS8YX3 aOkyt4Gf/qPFxLXX8u7RP6sur3+BpvgfWLqo5mg= X-Received: by 2002:a02:1bdc:: with SMTP id 89-v6mr16622721jas.72.1532463332916; Tue, 24 Jul 2018 13:15:32 -0700 (PDT) MIME-Version: 1.0 References: <87efft5ncd.fsf_-_@xmission.com> <20180724032419.20231-20-ebiederm@xmission.com> <874lgo5xdg.fsf@xmission.com> <87fu084cxj.fsf@xmission.com> In-Reply-To: <87fu084cxj.fsf@xmission.com> From: Linus Torvalds Date: Tue, 24 Jul 2018 13:15:21 -0700 Message-ID: Subject: Re: [PATCH 20/20] signal: Don't restart fork when signals come in. To: "Eric W. Biederman" Cc: Oleg Nesterov , Andrew Morton , Linux Kernel Mailing List , Wen Yang , majiang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 1:05 PM Eric W. Biederman wrote: > > What I hear you asking is moving up copy_signal copy_sighand copy_creds > and alloc_pid, and anything else that signal delivery might depend on. No, _just_ signal allocation. It would still just use the special-case list to set the pending bit. No creds, no "full task", nothing like that. > I really want something very simple and straight forward because I don't > see us testing or hitting this code path much in practice. Moving this > into the middle of fork and adding more depedencies does not seem like > it will be that kind of straight forward. I think your "list on the stack" was anything but straightforward, considering how utterly broken the error handling of the patch was. But hey., send a fixed patch and see how it looks. I think you'll end up adding a lot of "goto signal_cleanup" cases. Linus