From: Mark Lord <lkml@rtr.ca>
To: Greg KH <gregkh@suse.de>
Cc: 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: [PATCH] Fix 2.6.21 rfcomm lockups (2.6.21 regression)
Date: Sun, 04 Mar 2007 13:26:49 -0500 [thread overview]
Message-ID: <45EB0F69.5070002@rtr.ca> (raw)
In-Reply-To: <45EB0814.5030306@rtr.ca>
Mark Lord wrote:
> Any attempt to open/use a bluetooth rfcomm device locks up
> scheduling completely on my machine.
>
> Interrupts (ping, alt-sysrq) seem to be alive, but nothing else.
>
> This was working fine in 2.6.20, broken now in 2.6.21-rc2-git*
Further info: Reverting this change (below) fixes it:
| author Marcel Holtmann <marcel@holtmann.org>
| Sat, 17 Feb 2007 22:58:57 +0000 (23:58 +0100)
| committer David S. Miller <davem@sunset.davemloft.net>
| Mon, 26 Feb 2007 19:42:41 +0000 (11:42 -0800)
| commit c1a3313698895d8ad4760f98642007bf236af2e8
| tree 337a876f727061362b6a169f8759849c105b8f7a tree | snapshot
| parent f5ffd4620aba9e55656483ae1ef5c79ba81f5403 commit | diff
| | [Bluetooth] Make use of device_move() for RFCOMM TTY devices
| | In the case of bound RFCOMM TTY devices the parent is not available
| before its usage. So when opening a RFCOMM TTY device, move it to
| the corresponding ACL device as a child. When closing the device,
| move it back to the virtual device tree.
| Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
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)) {
next prev parent reply other threads:[~2007-03-04 18:26 UTC|newest]
Thread overview: 8+ 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 ` [Bluez-devel] " Marcel Holtmann
2007-03-04 17:33 ` Marcel Holtmann
2007-03-04 17:55 ` Mark Lord
2007-03-04 18:26 ` Mark Lord [this message]
2007-03-05 12:41 ` [PATCH] Fix 2.6.21 rfcomm lockups (2.6.21 regression) Cornelia Huck
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=45EB0F69.5070002@rtr.ca \
--to=lkml@rtr.ca \
--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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.