rfcomm tty: destroy before tty_close()
Subsystems (3)
PATCH 7/7 rfcomm tty: destroy before tty_close()
From: Dave Young <[email protected]>
rfcomm dev could be deleted in tty_hangup, so we must not call rfcomm_dev_del again to prevent from destroying rfcomm dev before tty close.
Signed-off-by Dave Young <[email protected]>
Cc Marcel Holtmann <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
net/bluetooth/rfcomm/tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/rfcomm/tty.c renamed from net/bluetooth/rfcomm/tty.c~rfcomm-tty-destroy-before-tty_close +2 -1
@@ -429,7 +429,8 @@ static int rfcomm_release_dev(void __useif (dev->tty)tty_vhangup (dev->tty); -rfcomm_dev_del (dev); +if (!test_bit (RFCOMM_RELEASE_ONHUP , &dev->flags)) +rfcomm_dev_del (dev);rfcomm_dev_put (dev);return 0 ; }
_
From: [email protected]
Date: Mon, 04 Feb 2008 23:48:20 -0800
Quoted 9 lines
From: Dave Young <[email protected]>
rfcomm dev could be deleted in
tty_hangup, so we must not callrfcomm_dev_delagain to prevent from destroying rfcomm dev before tty close.Signed-off-by Dave Young <[email protected]>Cc Marcel Holtmann <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied, thanks.