From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH][RFC] %pd - for printing dentry name Date: Thu, 4 Feb 2010 04:53:57 +0000 Message-ID: <20100204045357.GC30031@ZenIV.linux.org.uk> References: <20100201222511.GA12882@ZenIV.linux.org.uk> <20100201231847.GC12882@ZenIV.linux.org.uk> <20100202010653.GD12882@ZenIV.linux.org.uk> <20100202170157.GH12882@ZenIV.linux.org.uk> <20100203030419.GA30031@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Linus Torvalds Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:58882 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757393Ab0BDEyA (ORCPT ); Wed, 3 Feb 2010 23:54:00 -0500 Content-Disposition: inline In-Reply-To: <20100203030419.GA30031@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Feb 03, 2010 at 03:04:19AM +0000, Al Viro wrote: > On Tue, Feb 02, 2010 at 11:19:52AM -0800, Eric W. Biederman wrote: > > > If we are going to take a lock this seems as sane as any. > > > > Do we want to honor oops_in_progress aka bust_spinlocks here? > > > > Perhaps just: > > if (oops_in_progress) > > return buf; > > > > To guarantee we get the rest of a panic message out of the kernel. > > Hmm... There's another fun issue - we would want local_irq_disable() / > local_irq_enable() in d_move_locked and local_irq_save/local_irq_restore() > in dname_string(), AFAICT. > > OK, here's what I've got from moving in that direction. Folks, how does > that one look to you? I'm not too happy about explicit manipulations > with irq flags in there, so any suggestions would be welcome. Argh. No, it's not at all better. Moreover, even read_seqbegin variant is b0rken if we ever do that under ->d_lock. CPU1:A: grabs dentry->d_lock CPU2:B: calls d_move_locked() CPU2:B: grabs rename_lock CPU2:B: spins on dentry->d_lock CPU1:A: calls printk with %pd dentry CPU1:A: spins waiting for rename_lock writer to release it So much for that approach ;-/