From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765388AbYEHRAX (ORCPT ); Thu, 8 May 2008 13:00:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765540AbYEHQ5y (ORCPT ); Thu, 8 May 2008 12:57:54 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:47321 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765532AbYEHQ5u (ORCPT ); Thu, 8 May 2008 12:57:50 -0400 Date: Thu, 8 May 2008 12:57:24 -0400 From: Christoph Hellwig To: Miklos Szeredi Cc: akpm@linux-foundation.org, hch@infradead.org, viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, OGAWA Hirofumi , sds@tycho.nsa.gov, jmorris@namei.org, casey@schaufler-ca.com Subject: Re: [patch 07/24] fat: dont call notify_change Message-ID: <20080508165724.GD13914@infradead.org> References: <20080506091327.259950960@szeredi.hu> <20080506091414.440652004@szeredi.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080506091414.440652004@szeredi.hu> User-Agent: Mutt/1.5.17 (2007-11-01) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 06, 2008 at 11:13:34AM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > The FAT_IOCTL_SET_ATTRIBUTES ioctl() calls notify_change() to change > the file mode before changing the inode attributes. Replace with > explicit call to fat_setattr(). > > This is equivalent, except that security_inode_setattr() is not called > before fat_setattr(). I think this is not needed, since the mode > change is just a side effect of the attribute change. Actually I think we want the security_inode_setattr. This is an implicit chmode when switching the ATTR_RO flag on and off and we should have the full security check for it. Then again I'm not sure the security modules care about this level of detail because there's probably even worse ioctl hidden somewhere. Ccing the Selinux guys and Casey in case they care.