From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Mark Lord <lkml@rtr.ca>
Cc: Greg KH <gregkh@suse.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
bluez-devel@lists.sourceforge.net, marcel@holtmann.org,
Andrew Morton <akpm@osdl.org>,
"David S. Miller" <davem@sunset.davemloft.net>
Subject: Re: [PATCH] Fix 2.6.21 rfcomm lockups (2.6.21 regression)
Date: Mon, 5 Mar 2007 13:41:53 +0100 [thread overview]
Message-ID: <20070305134153.04f97fc0@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <45EB0F69.5070002@rtr.ca>
On Sun, 04 Mar 2007 13:26:49 -0500,
Mark Lord <lkml@rtr.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@pobox.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@de.ibm.com>
next prev parent reply other threads:[~2007-03-05 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-04 14:53 [Regression] Bluetooth RFComm: using it locks up the machine Mark Lord
2007-03-04 15:12 ` Mark Lord
2007-03-04 17:33 ` Marcel Holtmann
2007-03-04 17:55 ` Mark Lord
2007-03-04 18:26 ` [PATCH] Fix 2.6.21 rfcomm lockups (2.6.21 regression) Mark Lord
2007-03-05 12:41 ` Cornelia Huck [this message]
2007-03-05 15:33 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070305134153.04f97fc0@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=akpm@osdl.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=davem@sunset.davemloft.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®