From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759994AbcBYDTB (ORCPT ); Wed, 24 Feb 2016 22:19:01 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:33352 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758439AbcBYDS7 (ORCPT ); Wed, 24 Feb 2016 22:18:59 -0500 Date: Thu, 25 Feb 2016 03:18:52 +0000 From: Al Viro To: Oleg Nesterov Cc: Sasha Levin , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org, peterz@infradead.org Subject: Re: [PATCH] signals: work around random wakeups in sigsuspend() Message-ID: <20160225031852.GV17997@ZenIV.linux.org.uk> References: <1453735306-13519-1-git-send-email-sasha.levin@oracle.com> <20160125190915.GA9362@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160125190915.GA9362@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote: > On 01/25, Sasha Levin wrote: > > > > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING > > being set. > > and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the > bugfix, not work-around ;) > > > Avoid that by making sure we were signaled, like sys_pause() does. > > > > Signed-off-by: Sasha Levin > > Acked-by: Oleg Nesterov > > Thanks Sasha. Out of curiousity - where did that stray wakeup come from? PTRACE_KILL used to trigger those, but that got fixed. How does one trigger that kind of bugs on the current kernels?