lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100203142218.GA27676@suse.de>
Date:	Wed, 3 Feb 2010 06:22:18 -0800
From:	Greg KH <gregkh@...e.de>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	LKML <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
	Serge Hallyn <serue@...ibm.com>
Subject: Re: sysfs_chmod_file() broken in 2.6.33-rc4-git6

On Wed, Feb 03, 2010 at 09:11:38AM +0100, Jean Delvare wrote:
> On Thu, 21 Jan 2010 20:19:13 -0800, Greg KH wrote:
> > On Wed, Jan 20, 2010 at 04:00:08PM +0100, Jean Delvare wrote:
> > > On Wed, 20 Jan 2010 06:01:02 -0800, Eric W. Biederman wrote:
> > > > Does this fix your issue?
> > > > 
> > > > Eric
> > > > 
> > > > 
> > > > diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
> > > > index 220b758..6a06a1d 100644
> > > > --- a/fs/sysfs/inode.c
> > > > +++ b/fs/sysfs/inode.c
> > > > @@ -81,24 +81,23 @@ int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr * iattr)
> > > >  		if (!sd_attrs)
> > > >  			return -ENOMEM;
> > > >  		sd->s_iattr = sd_attrs;
> > > > -	} else {
> > > > -		/* attributes were changed at least once in past */
> > > > -		iattrs = &sd_attrs->ia_iattr;
> > > > -
> > > > -		if (ia_valid & ATTR_UID)
> > > > -			iattrs->ia_uid = iattr->ia_uid;
> > > > -		if (ia_valid & ATTR_GID)
> > > > -			iattrs->ia_gid = iattr->ia_gid;
> > > > -		if (ia_valid & ATTR_ATIME)
> > > > -			iattrs->ia_atime = iattr->ia_atime;
> > > > -		if (ia_valid & ATTR_MTIME)
> > > > -			iattrs->ia_mtime = iattr->ia_mtime;
> > > > -		if (ia_valid & ATTR_CTIME)
> > > > -			iattrs->ia_ctime = iattr->ia_ctime;
> > > > -		if (ia_valid & ATTR_MODE) {
> > > > -			umode_t mode = iattr->ia_mode;
> > > > -			iattrs->ia_mode = sd->s_mode = mode;
> > > > -		}
> > > > +	}
> > > > +	/* attributes were changed at least once in past */
> > > > +	iattrs = &sd_attrs->ia_iattr;
> > > > +
> > > > +	if (ia_valid & ATTR_UID)
> > > > +		iattrs->ia_uid = iattr->ia_uid;
> > > > +	if (ia_valid & ATTR_GID)
> > > > +		iattrs->ia_gid = iattr->ia_gid;
> > > > +	if (ia_valid & ATTR_ATIME)
> > > > +		iattrs->ia_atime = iattr->ia_atime;
> > > > +	if (ia_valid & ATTR_MTIME)
> > > > +		iattrs->ia_mtime = iattr->ia_mtime;
> > > > +	if (ia_valid & ATTR_CTIME)
> > > > +		iattrs->ia_ctime = iattr->ia_ctime;
> > > > +	if (ia_valid & ATTR_MODE) {
> > > > +		umode_t mode = iattr->ia_mode;
> > > > +		iattrs->ia_mode = sd->s_mode = mode;
> > > >  	}
> > > >  	return 0;
> > > >  }
> > > 
> > > Yes, this fixes my problem. Thanks for the fast fix!
> > 
> > Great, Eric, care to resend this so that I can submit it for inclusion?
> 
> Ping Eric, the patch is still not in Linus' tree.

Nor mine :)

Eric, care to send it to me?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ