From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [patch 06/15] sysfs: dont call notify_change Date: Mon, 5 May 2008 21:15:55 -0700 Message-ID: <20080506041555.GA4655@suse.de> References: <20080505095440.820370974@szeredi.hu> <20080505095516.130659599@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, hch@infradead.org, viro@ZenIV.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: <20080505095516.130659599@szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, May 05, 2008 at 11:54:47AM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > sysfs_chmod_file() calls notify_change() to change the permission bits > on a sysfs file. Replace with explicit call to sysfs_setattr() and > fsnotify_change(). > > This is equivalent, except that security_inode_setattr() is not > called. This function is called by drivers, so the security checks do > not make any sense. Are you sure? As a user, you can chmod the sysfs file and it will stick, I thought that is what this function was accomplishing. You will want to call the security checks in those cases, right? thanks, greg k-h