Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751AbaATVmu (ORCPT ); Mon, 20 Jan 2014 16:42:50 -0500 Received: from netrider.rowland.org ([192.131.102.5]:39231 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752586AbaATVmq (ORCPT ); Mon, 20 Jan 2014 16:42:46 -0500 Date: Mon, 20 Jan 2014 16:42:45 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Oleg Nesterov cc: Peter Zijlstra , Greg Kroah-Hartman , , Ingo Molnar , Thomas Gleixner , Steven Rostedt , Paul McKenney , Linus Torvalds , Dave Jones Subject: Re: [PATCH 0/5] lockdep: (Was: check && lockdep_no_validate) In-Reply-To: <20140120185401.GA27651@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Jan 2014, Oleg Nesterov wrote: > > > At first glance, can't __ATTR_IGNORE_LOCKDEP() use no_validate too ? > > > (ignoring the fact checkpatch.pl won't be happy). This can simplify > > > the code, it seems. > > > > Well, the macro itself doesn't specify the lockdep class. That happens > > implicitly in sysfs_get_active(), in the call to rwsem_acquire_read(). > > However, it ought to be possible to change the code so that when > > ignore_lockdep(sd) returns nonzero, we end up using no_validate. > > sysfs_dirent_init_lockdep() can check ->ignore_lockdep and do > lockdep_set_novalidate_class(). This way sysfs_ignore_lockdep() can > go away. > > I guess we could even change __ATTR_IGNORE_LOCKDEP() to initialize > ->key = __lockdep_no_validate__ and kill ->ignore_lockdep. It's clear that you have a more thorough understanding of how sysfs and lockdep work than I do. :-) This suggestion sounds quite reasonable. Alan Stern -- 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/