From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933336AbcAYTiW (ORCPT ); Mon, 25 Jan 2016 14:38:22 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:48679 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933146AbcAYTiF (ORCPT ); Mon, 25 Jan 2016 14:38:05 -0500 Date: Mon, 25 Jan 2016 20:37:58 +0100 From: Peter Zijlstra To: Oleg Nesterov Cc: Sasha Levin , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org Subject: Re: [PATCH] signals: work around random wakeups in sigsuspend() Message-ID: <20160125193758.GB6357@twins.programming.kicks-ass.net> 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 (2012-12-30) 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 ;) Agreed! > > Avoid that by making sure we were signaled, like sys_pause() does. > > > > Signed-off-by: Sasha Levin > > Acked-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel)