Commit:     0de1517e23c2e28d58a6344b97a120596ea200bb
Parent:     166f60dde0f3793e67bd0d76952eaa46705bbaa9
Author:     Mark Lord <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 6 01:42:03 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Mar 6 09:30:24 2007 -0800

    [PATCH] Fix 2.6.21 rfcomm lockups
    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*
    Reverting this change (below) fixes it:
    | author    Marcel Holtmann <[EMAIL PROTECTED]>
    |      Sat, 17 Feb 2007 22:58:57 +0000 (23:58 +0100)
    | committer    David S. Miller <[EMAIL PROTECTED]>
    |      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 <[EMAIL PROTECTED]>
    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 <[EMAIL PROTECTED]>
    Acked-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/sysfs/dir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 8813990..85a6686 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -431,6 +431,8 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject 
        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 */
        if (!mutex_trylock(&new_parent_dentry->d_inode->i_mutex)) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to