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: <20070521043540.GA9214@in.ibm.com>
Date:	Mon, 21 May 2007 10:05:40 +0530
From:	Maneesh Soni <maneesh@...ibm.com>
To:	Tejun Heo <htejun@...il.com>
Cc:	Greg KH <greg@...ah.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Clemens Schwaighofer <cs@...uila.co.jp>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Chuck Ebbert <cebbert@...hat.com>
Subject: Re: [PATCH 1/2] sysfs: fix condition check in sysfs_drop_dentry()

On Thu, May 17, 2007 at 07:52:53PM +0200, Tejun Heo wrote:
> The condition check doesn't make much sense as it basically always
> succeeds.  This causes NULL dereferencing on certain cases.  It seems
> that parentheses are put in the wrong place.  Fix it.
> 
> DON'T APPLY JUST YET
> ---
> 
> Maneesh, is this correct?
> 
Yes.

>  fs/sysfs/inode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: work/fs/sysfs/inode.c
> ===================================================================
> --- work.orig/fs/sysfs/inode.c
> +++ work/fs/sysfs/inode.c
> @@ -250,7 +250,7 @@ void sysfs_drop_dentry(struct sysfs_dire
>  	if (dentry) {
>  		spin_lock(&dcache_lock);
>  		spin_lock(&dentry->d_lock);
> -		if (!(d_unhashed(dentry) && dentry->d_inode)) {
> +		if (!d_unhashed(dentry) && dentry->d_inode) {
>  			inode = dentry->d_inode;
>  			spin_lock(&inode->i_lock);
>  			__iget(inode);


Ack'ed

Thanks
Maneesh

-- 
Maneesh Soni
Linux Technology Center,
IBM India Systems and Technology Lab, 
Bangalore, India
-
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