Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=84950cf0ba02fd6a5defe2511bc41f9aa2237632
Commit:     84950cf0ba02fd6a5defe2511bc41f9aa2237632
Parent:     924f0e4a06419fa1996425d1d2512030e43acbba
Author:     Mikko Rapeli <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 09:18:15 2007 +0200
Committer:  Marcel Holtmann <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 07:01:26 2007 +0200

    [Bluetooth] Hangup TTY before releasing rfcomm_dev
    
    The core problem is that RFCOMM socket layer ioctl can release
    rfcomm_dev struct while RFCOMM TTY layer is still actively using
    it. Calling tty_vhangup() is needed for a synchronous hangup before
    rfcomm_dev is freed.
    
    Addresses the oops at http://bugzilla.kernel.org/show_bug.cgi?id=7509
    
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>
---
 net/bluetooth/rfcomm/tty.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index b2b1cce..ba469b0 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -383,6 +383,10 @@ static int rfcomm_release_dev(void __user *arg)
        if (req.flags & (1 << RFCOMM_HANGUP_NOW))
                rfcomm_dlc_close(dev->dlc, 0);
 
+       /* Shut down TTY synchronously before freeing rfcomm_dev */
+       if (dev->tty)
+               tty_vhangup(dev->tty);
+
        rfcomm_dev_del(dev);
        rfcomm_dev_put(dev);
        return 0;
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to