diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-11 13:24:45 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-11 13:24:45 -0400 |
commit | 438145c7ef5c9445f25bb8fc4d52e2c9d11fdc7c (patch) | |
tree | 76941991e36f4a32bf1be0db3854959053f24619 /drivers/bluetooth | |
parent | 9ddd1b8ad8abd321964b8add5581910de6d67c2a (diff) |
Update from 2.6.36 to 2.6.36.4wip-dissipation-jerickso
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 998833d93c13..17361bad46dd 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -256,9 +256,16 @@ static int hci_uart_tty_open(struct tty_struct *tty) | |||
256 | 256 | ||
257 | BT_DBG("tty %p", tty); | 257 | BT_DBG("tty %p", tty); |
258 | 258 | ||
259 | /* FIXME: This btw is bogus, nothing requires the old ldisc to clear | ||
260 | the pointer */ | ||
259 | if (hu) | 261 | if (hu) |
260 | return -EEXIST; | 262 | return -EEXIST; |
261 | 263 | ||
264 | /* Error if the tty has no write op instead of leaving an exploitable | ||
265 | hole */ | ||
266 | if (tty->ops->write == NULL) | ||
267 | return -EOPNOTSUPP; | ||
268 | |||
262 | if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) { | 269 | if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) { |
263 | BT_ERR("Can't allocate control structure"); | 270 | BT_ERR("Can't allocate control structure"); |
264 | return -ENFILE; | 271 | return -ENFILE; |