Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762139AbYFNAOt (ORCPT ); Fri, 13 Jun 2008 20:14:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760295AbYFNAMr (ORCPT ); Fri, 13 Jun 2008 20:12:47 -0400 Received: from ns.suse.de ([195.135.220.2]:34125 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757942AbYFNAMp (ORCPT ); Fri, 13 Jun 2008 20:12:45 -0400 Date: Fri, 13 Jun 2008 17:10:34 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, mszeredi@suse.cz, mhalcrow@us.ibm.com, Chris Wright Subject: [patch 08/47] ecryptfs: add missing lock around notify_change Message-ID: <20080614001034.GH24698@suse.de> References: <20080613234753.235721454@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="ecryptfs-add-missing-lock-around-notify_change.patch" In-Reply-To: <20080614000840.GA24659@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 37 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Miklos Szeredi upstream commit: 9c3580aa52195699065bc2d7242b1c7e3e6903fa Callers of notify_change() need to hold i_mutex. Signed-off-by: Miklos Szeredi Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright --- fs/ecryptfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -908,7 +908,9 @@ static int ecryptfs_setattr(struct dentr if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) ia->ia_valid &= ~ATTR_MODE; + mutex_lock(&lower_dentry->d_inode->i_mutex); rc = notify_change(lower_dentry, ia); + mutex_unlock(&lower_dentry->d_inode->i_mutex); out: fsstack_copy_attr_all(inode, lower_inode, NULL); return rc; -- -- 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/