From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934159AbcA0Rye (ORCPT ); Wed, 27 Jan 2016 12:54:34 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:38374 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933695AbcA0Ryd (ORCPT ); Wed, 27 Jan 2016 12:54:33 -0500 Date: Wed, 27 Jan 2016 18:54:27 +0100 From: Peter Zijlstra To: Oleg Nesterov Cc: Andrew Morton , Sasha Levin , linux-kernel@vger.kernel.org, mingo@kernel.org Subject: Re: [PATCH] signals: work around random wakeups in sigsuspend() Message-ID: <20160127175427.GW6357@twins.programming.kicks-ass.net> References: <1453735306-13519-1-git-send-email-sasha.levin@oracle.com> <20160125133205.36542c86ada93761d8a9ff06@linux-foundation.org> <20160126211009.GA4695@redhat.com> <20160127084443.GL6357@twins.programming.kicks-ass.net> <20160127164154.GB14320@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160127164154.GB14320@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 Wed, Jan 27, 2016 at 05:41:54PM +0100, Oleg Nesterov wrote: > Why? It should work either way. Yes, signal_wakeup() can come right before > __set_current_state(TASK_INTERRUPTIBLE) but this is fine, __schedule() must not > sleep if signal_pending() == T, Urgh yes, I always forget this :/