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: <20070305134153.04f97fc0@gondolin.boeblingen.de.ibm.com>
Date:	Mon, 5 Mar 2007 13:41:53 +0100
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Mark Lord <lkml@....ca>
Cc:	Greg KH <gregkh@...e.de>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	bluez-devel@...ts.sf.net, marcel@...tmann.org,
	Andrew Morton <akpm@...l.org>,
	"David S. Miller" <davem@...set.davemloft.net>
Subject: Re: [PATCH] Fix 2.6.21 rfcomm lockups (2.6.21 regression)

On Sun, 04 Mar 2007 13:26:49 -0500,
Mark Lord <lkml@....ca> wrote:

> The simplest fix for this bug is to prevent sysfs_move_dir()
> from self-deadlocking when (old_parent == new_parent).
> 
> This patch prevents total system lockup when using rfcomm devices.
> 
> Signed-off-by:  Mark Lord <mlord@...ox.com>
> ---
> --- 2.6.21/fs/sysfs/dir.c	2007-03-04 13:19:00.000000000 -0500
> +++ linux/fs/sysfs/dir.c	2007-03-04 13:20:45.000000000 -0500
> @@ -431,6 +431,8 @@
>  	new_parent_dentry = new_parent ?
>  		new_parent->dentry : sysfs_mount->mnt_sb->s_root;
> 
> +	if (old_parent_dentry->d_inode == new_parent_dentry->d_inode)
> +		return 0;	/* nothing to move */
>  again:
>  	mutex_lock(&old_parent_dentry->d_inode->i_mutex);
>  	if (!mutex_trylock(&new_parent_dentry->d_inode->i_mutex)) {

Hm, never thought that someone might call the moving functions with
old_parent == new_parent, sorry about that. It should be safe to
return success here, we add only a bit of overhead with some driver
model juggling and emitting a not needed uevent.

Acked-by: Cornelia Huck <cornelia.huck@...ibm.com>
-
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