Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5738138ybi; Tue, 4 Jun 2019 11:17:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/9g3AYfLisYGXvkN78RigGNcMrMFUFBEKr7m2S91BeFVBJSZ8QGuNV9tqpPGFA+Pg8Azl X-Received: by 2002:a17:902:8f96:: with SMTP id z22mr38245942plo.248.1559672249683; Tue, 04 Jun 2019 11:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559672249; cv=none; d=google.com; s=arc-20160816; b=wNlB1lCvg4k+rJwO2WT4gcY042P9bjN+pCbOXwwfujH1YSruPEw75/YRpcF5cAKsnU 7NiIGmxqQYKNsEO8Dye3nWQr5jiNVKPBv0hoyQhulTg7e77tulN/25hDj1ZMt13sB6gg U4ew19NMQKnQ36jARafnXgZTzcGUwke4u3ONae2dvVqCo+AwSqU2RPTannA5faL5NLH7 shRLBZ+ZFWimLZa6Xy07a36WY5pF5UEoDyWBDsxOWyfBliC0FQIeOlBcvfGfgSL/kPna NNUPs8JtOo4b+s8SApj6FVw9k/49FZkOprJ+oE9uNzYClylh4uSHnFaUjX4stvEgw3he uNiw== 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; bh=HCvwaoibVnjg9rjNg5TC6AzleXlhqUmKRsSL5YCF/MY=; b=EFMb3WdCOOxqoMQCbg1u3Q5wI2DWqhjRwkNYNdMveSSxrkGRw58CbYgNg4QwaEqdLi aE7KJjjHOUAXPds/Z+riOmDwJoXGwMlgKWSqIeEKu3IylZS+brIxAGCO0RagA87aJp9S 9dFv8ypL6tFfv15D7iM/JpnGbYtp84ruo2ynkdnEM7vLFwXC0fb0xa4cC1ZVsXiVe38U yfO/CUMivArasFWM+EAW136w2aBMK9boJy8F6oCVSU74t505kZqM8Pz9Rg91SaVStLA+ fuYVkMmNer6mvR2TIh1cbK5QDEwfNukvyXrx+1DVrJ6/kcrj1Ve64r2XVP59N7n3hs4Z BWKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AdRxKh1J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23si23237973pgm.556.2019.06.04.11.17.13; Tue, 04 Jun 2019 11:17:29 -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=@gmail.com header.s=20161025 header.b=AdRxKh1J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbfFDSOk (ORCPT + 99 others); Tue, 4 Jun 2019 14:14:40 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:51613 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbfFDSOk (ORCPT ); Tue, 4 Jun 2019 14:14:40 -0400 Received: by mail-it1-f194.google.com with SMTP id m3so1680185itl.1; Tue, 04 Jun 2019 11:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HCvwaoibVnjg9rjNg5TC6AzleXlhqUmKRsSL5YCF/MY=; b=AdRxKh1JZAxsWtP2YIms4M+pi5FfqgliDRG/gwm4NRjLcFbwmHOZ/qM7oFWJI1Kpml wbC6uLqRcgDx3wCG3+P5x0fSViBTaBtJxUh/fLJ8wztxCJ3ySDLRybYnqltJZYMBDb7Z 6kf3NBaSJLh/fi9jn8WgUEQY4II9Ctg4jGHjAvCNDiUuwI/TE7mEJQb7thbqWS7RImCy JCVvQZ1vd6rGcsksQSQIMvX1pHRRN3cUcYbTZT1otg6W03t6WZKf/IdHMdTq1FVGIin5 TaNMX0IiqoMs4W0tv0quyrYT7B5tIffjTQtPXl+AkGq69O6jePwzDp3ohuJyR8OkCH8S ZenA== 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=HCvwaoibVnjg9rjNg5TC6AzleXlhqUmKRsSL5YCF/MY=; b=XbSv7sZb3a+T35UospUJHbwldTXjJ+GRxOp82KZ1HQowEs8YoFOUiDYdp7TUdVYfnk hksm/gRoJ4McZAhN1EU1sqFQfLaJA2pYGcIjzVGacWAHLs654ejIJk6iA7FWIhs1ibFk J/l0DJf3Deg1jwqO637x7t8QzZ9DK4BxXqXAhdv5kC013/HwJ00DWdosWCMosm0HZCFZ NgAay/zlo1M19/GCzlHjl5tshTVuzQq4iiNt7eQiHiTFacnIKfuf/OsxPKNY7XuSeaU1 5edoBRfqMTc3Mzg8hDIUxrnCC+ZNtHTIx7q3CayJ+k/0QordBccYd7imuHzYCGF8m9TQ OhKA== X-Gm-Message-State: APjAAAVF6Z9I96DSwX9xccZz7XS+7Wr7IP071o7/0QEi+uRfEP7emCX7 v3ayLs9088Es4LhyvjlaPWmLnPrjylGIIgZAkPA= X-Received: by 2002:a24:8988:: with SMTP id s130mr21613638itd.79.1559672079550; Tue, 04 Jun 2019 11:14:39 -0700 (PDT) MIME-Version: 1.0 References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <20190604134117.GA29963@redhat.com> In-Reply-To: From: Deepa Dinamani Date: Tue, 4 Jun 2019 11:14:28 -0700 Message-ID: Subject: Re: [PATCH] signal: remove the wrong signal_pending() check in restore_user_sigmask() To: Arnd Bergmann Cc: Oleg Nesterov , Andrew Morton , Linux Kernel Mailing List , dbueso@suse.de, Jens Axboe , Davidlohr Bueso , Eric Wong , Jason Baron , Linux FS-devel Mailing List , linux-aio , Omar Kilani , Thomas Gleixner , "# 3.4.x" , Al Viro , "Eric W. Biederman" , Linus Torvalds , David Laight 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, Jun 4, 2019 at 3:41 PM Oleg Nesterov wrote: > > > > This is the minimal fix for stable, I'll send cleanups later. > > > > The commit 854a6ed56839a40f6b5d02a2962f48841482eec4 ("signal: Add > > restore_user_sigmask()") introduced the visible change which breaks > > user-space: a signal temporary unblocked by set_user_sigmask() can > > be delivered even if the caller returns success or timeout. > > > > Change restore_user_sigmask() to accept the additional "interrupted" > > argument which should be used instead of signal_pending() check, and > > update the callers. > > > > Reported-by: Eric Wong > > Fixes: 854a6ed56839a40f6b5d02a2962f48841482eec4 ("signal: Add restore_user_sigmask()") > > cc: stable@vger.kernel.org (v5.0+) > > Signed-off-by: Oleg Nesterov > Acked-by: Deepa Dinamani The original fix posted: https://lore.kernel.org/patchwork/patch/1077355/ would also have been a correct fix for this problem. But, given the cleanups that are in the pipeline, this is a better fix. -Deepa