Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54418
b: refs/heads/master
c: 77f2a45
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann committed May 4, 2007
1 parent e06cc94 commit 64096d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48db9ca4f2ac9f39eb90ccb12ad3ca7b645a552c
refs/heads/master: 77f2a45fa1ba33147fd6cc8ae546188504a822cd
11 changes: 8 additions & 3 deletions trunk/net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
if (dlc->state == BT_CLOSED) {
if (!dev->tty) {
if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) {
rfcomm_dev_hold(dev);
rfcomm_dev_del(dev);
if (rfcomm_dev_get(dev->id) == NULL)
return;

rfcomm_dev_del(dev);
/* We have to drop DLC lock here, otherwise
rfcomm_dev_put() will dead lock if it's
the last reference. */
Expand Down Expand Up @@ -974,8 +975,12 @@ static void rfcomm_tty_hangup(struct tty_struct *tty)

rfcomm_tty_flush_buffer(tty);

if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags))
if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) {
if (rfcomm_dev_get(dev->id) == NULL)
return;
rfcomm_dev_del(dev);
rfcomm_dev_put(dev);
}
}

static int rfcomm_tty_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *unused)
Expand Down

0 comments on commit 64096d5

Please sign in to comment.