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] [day] [month] [year] [list]
Message-ID: <20080218164425.GC26915@hasse.suse.de>
Date:	Mon, 18 Feb 2008 17:44:25 +0100
From:	Jan Blunck <jblunck@...e.de>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Erez Zadok <ezk@...sunysb.edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mmotm] fs/sysfs/file.c d_path fix

On Sun, Feb 17, Christoph Hellwig wrote:

> On Sat, Feb 16, 2008 at 02:12:05PM -0500, Erez Zadok wrote:
> > diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> > index 02223e2..a57b024 100644
> > --- a/fs/sysfs/file.c
> > +++ b/fs/sysfs/file.c
> > @@ -329,9 +329,11 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
> >  	struct sysfs_ops *ops;
> >  	int error = -EACCES;
> >  	char *p;
> > +	struct path sysfs_path;
> >  
> > -	p = d_path(file->f_dentry, sysfs_mount, last_sysfs_file,
> > -		   sizeof(last_sysfs_file));
> > +	sysfs_path.dentry = file->f_dentry;
> > +	sysfs_path.mnt = sysfs_mount;
> > +	p = d_path(&sysfs_path, last_sysfs_file, sizeof(last_sysfs_file));
> 
> A d_path(file->f_path, ..); should do it, but I'd really like to know
> what sysfs crowd was smoking when adding a d_path in ->open.  Guys,
> please explain what's going on here.
> 

This is from gregkh-driver-sysfs-crash-debugging.patch which is only in -mm I
guess.
--
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