Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754439AbbK3Sr3 (ORCPT ); Mon, 30 Nov 2015 13:47:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59474 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754351AbbK3Sr2 (ORCPT ); Mon, 30 Nov 2015 13:47:28 -0500 Date: Mon, 30 Nov 2015 19:48:04 +0100 From: Oleg Nesterov To: Peter Zijlstra Cc: Al Viro , Sasha Levin , Ingo Molnar , LKML Subject: Re: WARNING: CPU: 12 PID: 16862 at ./arch/x86/include/asm/thread_info.h:236 Message-ID: <20151130184804.GA7455@redhat.com> References: <565C775C.9050004@oracle.com> <20151130164404.GZ22011@ZenIV.linux.org.uk> <20151130165244.GA3816@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151130165244.GA3816@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1191 Lines: 35 On 11/30, Peter Zijlstra wrote: > > On Mon, Nov 30, 2015 at 04:44:05PM +0000, Al Viro wrote: > > On Mon, Nov 30, 2015 at 11:20:44AM -0500, Sasha Levin wrote: > > > Hi all, > > > > > > I've hit the following while fuzzing with trinity on the latest -next kernel: > > > > __set_current_state(TASK_INTERRUPTIBLE); > > schedule(); > > set_restore_sigmask(); > > > > somehow got out of schedule() without TIF_SIGPENDING being set... > > A random wakeup (which are always possible) can make that happen, right? Yes, sigsuspend() should do "while (!signal_pending(current))". Like sys_pause() does, -ERESTARTNOHAND without signal_pending() is equally wrong. I'll send the fix unless Sasha wants to do this. > I'm (as always) a little vague on signals, but who is responsible for > setting that bit? See above, TS_RESTORE_SIGMASK doesn't differ from -ERESTART* in that you can only use it if signal_pending() is true. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/