Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8052158ybi; Thu, 6 Jun 2019 06:02:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrqbRF/G59ODLWXSG65A/NE2Gvu/DveU36IV6iPPCudSdW4sdEmMWmxU/7cb+Ojr7Ma/QP X-Received: by 2002:a63:1208:: with SMTP id h8mr3162471pgl.377.1559826144077; Thu, 06 Jun 2019 06:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559826144; cv=none; d=google.com; s=arc-20160816; b=H1d8rgNHG4ruZgD4hSqJq1+WjNhiDzeY7+mNQtnbYy0GmViHo8mkZLsfZ7crDyNscB 6U6qmB6eRLipfvaxQT8IjiWks+UXvwYUcE11UmAH3i4ab46hZQ68Bzdn7EVSTh3YjcdL dmp7yX3Da79UqFHtcTelvHL0VYX21Z5OaDeZu5DCKLrFqz/DoASOYwlvgQU30Qe+ICTv AoOyAnBsLIFn6/ZtrOMo9ie8cZljXqJ9ce8A/95IacgB132gmVQpIuyjGPtmobVr57uy 0qPiKF9C5S34RYslOr2uR3yTC+ViSATXnjUz20F9+ZrBmaddrdo7bRoFc2QICKI1dV40 Br5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CEKkAhd73O+2HufaAAFPHjY/qaDL2WD98nV+1t2qdbc=; b=FXTpspGMPGb2lKwSD0KLBkwZybyXmG41P+iAIeUxEUH3dXg3yOApHrfnp7LN4P0EGY +saQnXUvWv61UHRxogcmGgo1gki6Q+GIWmjgwMs9YlQJFv0IY30i/5ZG3v/ihrg/3Iu1 PM7O9bnfJskHXEUtusaBTb7Bu0r0HHavIX0+Fy3iLfuG5Umnf4zTTsRcwz3+2nNftOWk ysoSox2i+kcDBgKKnJRyGNA//1FUfveeOBg+ancH0A4PDaHD9kpw28GIJbUf5d6LoX70 OSrP06zgcLtm9xM0Rz/pmOJ1PVg889CKP4y4mbBItXdnrSuJI6qWez94TtYl2ySkOPRs ADMw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az8si1735946plb.219.2019.06.06.06.02.07; Thu, 06 Jun 2019 06:02:24 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbfFFMlc (ORCPT + 99 others); Thu, 6 Jun 2019 08:41:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58238 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727029AbfFFMlc (ORCPT ); Thu, 6 Jun 2019 08:41:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B79F93086273; Thu, 6 Jun 2019 12:41:11 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.159]) by smtp.corp.redhat.com (Postfix) with SMTP id A935E7D65A; Thu, 6 Jun 2019 12:41:04 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 6 Jun 2019 14:41:11 +0200 (CEST) Date: Thu, 6 Jun 2019 14:41:03 +0200 From: Oleg Nesterov To: David Laight Cc: 'Linus Torvalds' , Andrew Morton , Deepa Dinamani , Linux List Kernel Mailing , Arnd Bergmann , Davidlohr Bueso , Jens Axboe , Davidlohr Bueso , "e@80x24.org" , Jason Baron , linux-fsdevel , "linux-aio@kvack.org" , "omar.kilani@gmail.com" , Thomas Gleixner , stable , Al Viro , "Eric W. Biederman" Subject: Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask Message-ID: <20190606124103.GB4691@redhat.com> References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <20190604134117.GA29963@redhat.com> <20190605155801.GA25165@redhat.com> <1285a2e60e3748d8825b9b0e3500cd28@AcuMS.aculab.com> <20190606110522.GA4691@redhat.com> <6e3eeb101a30431eb111ad739ab5d2b0@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e3eeb101a30431eb111ad739ab5d2b0@AcuMS.aculab.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 06 Jun 2019 12:41:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06, David Laight wrote: > > Some of this code is hard to grep through :-) I'd suggest to simply read the kernel code once and memorise it, after that you will not need to use grep. > > When signal handler returns it does sys_rt_sigreturn() which restores > > the original mask saved in uc_sigmask. > > Does that mean that if 2 signals interrupt epoll_wait() only > one of the signal handlers is run? I'll assume that both signals were blocked before syscall and temporary unblocked by pselect. Quite contrary, they both will be delivered exactly because original mask won't be restored until the 1st handler returns. Unless, of course, the sigaction->sa_mask of the 1st signal blocks another one. Didn't I say you do not read my emails? I have already explained this to you in this thread ;) Oleg.