diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:02:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:02:55 -0400 |
commit | b4a41ed24c858d75985c7dcba685715fdf2e6114 (patch) | |
tree | 04a28143a4b6ce37fdca3106dabfae713315184c /drivers/usb/class/cdc-acm.c | |
parent | 76d21c563569bcea6bc67d65cc2c460cff643058 (diff) | |
parent | 7e7797e7f6f7bfab73fca02c65e40eaa5bb9000c (diff) |
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: cdc-acm: fix potential null-pointer dereference on disconnect
USB: cdc-acm: fix potential null-pointer dereference
USB: cdc-acm: fix memory corruption / panic
USB: Fix 'bad dma' problem on WDM device disconnect
usb: wwan: fix compilation without CONFIG_PM_RUNTIME
USB: uss720 fixup refcount position
usb: musb: blackfin: fix typo in new bfin_musb_vbus_status func
usb: musb: blackfin: fix typo in new dev_pm_ops struct
usb: musb: blackfin: fix typo in platform driver name
usb: musb: Fix for merge issue
ehci-hcd: Bug fix: don't set a QH's Halt bit
USB: Do not pass negative length to snoop_urb()
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index f492a7f2b6ee..e057e5381465 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -297,6 +297,8 @@ static void acm_ctrl_irq(struct urb *urb) | |||
297 | if (!ACM_READY(acm)) | 297 | if (!ACM_READY(acm)) |
298 | goto exit; | 298 | goto exit; |
299 | 299 | ||
300 | usb_mark_last_busy(acm->dev); | ||
301 | |||
300 | data = (unsigned char *)(dr + 1); | 302 | data = (unsigned char *)(dr + 1); |
301 | switch (dr->bNotificationType) { | 303 | switch (dr->bNotificationType) { |
302 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: | 304 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: |
@@ -336,7 +338,6 @@ static void acm_ctrl_irq(struct urb *urb) | |||
336 | break; | 338 | break; |
337 | } | 339 | } |
338 | exit: | 340 | exit: |
339 | usb_mark_last_busy(acm->dev); | ||
340 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 341 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
341 | if (retval) | 342 | if (retval) |
342 | dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with " | 343 | dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with " |
@@ -533,6 +534,8 @@ static void acm_softint(struct work_struct *work) | |||
533 | if (!ACM_READY(acm)) | 534 | if (!ACM_READY(acm)) |
534 | return; | 535 | return; |
535 | tty = tty_port_tty_get(&acm->port); | 536 | tty = tty_port_tty_get(&acm->port); |
537 | if (!tty) | ||
538 | return; | ||
536 | tty_wakeup(tty); | 539 | tty_wakeup(tty); |
537 | tty_kref_put(tty); | 540 | tty_kref_put(tty); |
538 | } | 541 | } |
@@ -646,8 +649,10 @@ static void acm_port_down(struct acm *acm) | |||
646 | usb_kill_urb(acm->ctrlurb); | 649 | usb_kill_urb(acm->ctrlurb); |
647 | for (i = 0; i < ACM_NW; i++) | 650 | for (i = 0; i < ACM_NW; i++) |
648 | usb_kill_urb(acm->wb[i].urb); | 651 | usb_kill_urb(acm->wb[i].urb); |
652 | tasklet_disable(&acm->urb_task); | ||
649 | for (i = 0; i < nr; i++) | 653 | for (i = 0; i < nr; i++) |
650 | usb_kill_urb(acm->ru[i].urb); | 654 | usb_kill_urb(acm->ru[i].urb); |
655 | tasklet_enable(&acm->urb_task); | ||
651 | acm->control->needs_remote_wakeup = 0; | 656 | acm->control->needs_remote_wakeup = 0; |
652 | usb_autopm_put_interface(acm->control); | 657 | usb_autopm_put_interface(acm->control); |
653 | } | 658 | } |