* [patch 7/7] rfcomm tty: destroy before tty_close()
@ 2008-02-05 7:48 akpm
2008-02-05 11:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-02-05 7:48 UTC (permalink / raw)
To: marcel; +Cc: netdev, akpm, hidave.darkstar
From: Dave Young <hidave.darkstar@gmail.com>
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 <hidave.darkstar@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/bluetooth/rfcomm/tty.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN net/bluetooth/rfcomm/tty.c~rfcomm-tty-destroy-before-tty_close net/bluetooth/rfcomm/tty.c
--- a/net/bluetooth/rfcomm/tty.c~rfcomm-tty-destroy-before-tty_close
+++ a/net/bluetooth/rfcomm/tty.c
@@ -429,7 +429,8 @@ static int rfcomm_release_dev(void __use
if (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;
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 7/7] rfcomm tty: destroy before tty_close()
2008-02-05 7:48 [patch 7/7] rfcomm tty: destroy before tty_close() akpm
@ 2008-02-05 11:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-02-05 11:12 UTC (permalink / raw)
To: akpm; +Cc: marcel, netdev, hidave.darkstar
From: akpm@linux-foundation.org
Date: Mon, 04 Feb 2008 23:48:20 -0800
> From: Dave Young <hidave.darkstar@gmail.com>
>
> 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 <hidave.darkstar@gmail.com>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-05 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05 7:48 [patch 7/7] rfcomm tty: destroy before tty_close() akpm
2008-02-05 11:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox