Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212906
b: refs/heads/master
c: c19483c
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 22, 2010
1 parent b7a317c commit 018c778
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4429f608abde89e8bc1e24b43cd503feb95c496
refs/heads/master: c19483cc5e56ac5e22dd19cf25ba210ab1537773
7 changes: 7 additions & 0 deletions trunk/drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,16 @@ static int hci_uart_tty_open(struct tty_struct *tty)

BT_DBG("tty %p", tty);

/* FIXME: This btw is bogus, nothing requires the old ldisc to clear
the pointer */
if (hu)
return -EEXIST;

/* Error if the tty has no write op instead of leaving an exploitable
hole */
if (tty->ops->write == NULL)
return -EOPNOTSUPP;

if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
BT_ERR("Can't allocate control structure");
return -ENFILE;
Expand Down

0 comments on commit 018c778

Please sign in to comment.