From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 584917F3F for ; Fri, 14 Feb 2014 10:16:37 -0600 (CST) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay1.corp.sgi.com (Postfix) with ESMTP id 3056C8F8039 for ; Fri, 14 Feb 2014 08:16:37 -0800 (PST) Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) by cuda.sgi.com with ESMTP id HmHHgXFGEKDzZTDZ (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 14 Feb 2014 08:16:35 -0800 (PST) Date: Fri, 14 Feb 2014 16:16:24 +0000 From: Al Viro Subject: Re: 3.14-rc2 XFS backtrace because irqs_disabled. Message-ID: <20140214161623.GU18016@ZenIV.linux.org.uk> References: <20140212040358.GA25327@redhat.com> <20140212042215.GN18016@ZenIV.linux.org.uk> <20140212054043.GB13997@dastard> <20140212113928.GO18016@ZenIV.linux.org.uk> <20140212211421.GP18016@ZenIV.linux.org.uk> <20140214161302.GA16416@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140214161302.GA16416@infradead.org> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Christoph Hellwig Cc: Linux Kernel , Eric Sandeen , Oleg Nesterov , xfs@oss.sgi.com, Dave Jones , Linus Torvalds On Fri, Feb 14, 2014 at 08:13:02AM -0800, Christoph Hellwig wrote: > On Wed, Feb 12, 2014 at 01:32:55PM -0800, Linus Torvalds wrote: > > We'd have to teach each user of "dequeue_signal()" to free the siginfo > > thing. Which shouldn't be too bad - I think we've collected all of > > that into generic code, and there isn't the mass or architecture code > > that knows about these things any more. But there are a few odd > > drivers etc and signalfd. > > The few odd drivers are nbd, jffs2 and the usb mass storage gadget. > All of these have in common that they try to handle signals in a kernel > thread (which we don't even allow by default), and that they ignore the > siginfo. I think they could mostly be replaced by an addition to the > kthread API to allow a kthread to be killed by signals for legacy > reasons. FWIW, there's a funny situation - all users of dequeue_signal_lock() actually ignore info completely. I'm not saying that we ought to stop returning it, but e.g. jbd part of that patch is simply diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 2b60ce1..aefdff2 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c @@ -119,13 +119,14 @@ static int jffs2_garbage_collect_thread(void *_c) /* Put_super will send a SIGKILL and then wait on the sem. */ while (signal_pending(current) || freezing(current)) { - siginfo_t info; + ksiginfo_t info; unsigned long signr; if (try_to_freeze()) goto again; signr = dequeue_signal_lock(current, ¤t->blocked, &info); + dismiss_siginfo(&info); switch(signr) { case SIGSTOP: Not complicated at all. Where it does get complicated is ->last_siginfo and PTRACE_SETSIGINFO - getting that reasonably clean is what I'm still fighting right now... _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs