ChangeSet 1.1722.83.10, 2004/06/02 13:55:44-07:00, oliver@neukum.org [PATCH] USB: fix race between disconnect and write of acm driver acm uses a workqueue to defer part of a write operation. In case of disconnect this work must be waited for. - fix race between write and disconnect Signed-off-by: Oliver Neukum Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 ++ 1 files changed, 2 insertions(+) diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c Fri Jun 18 11:05:43 2004 +++ b/drivers/usb/class/cdc-acm.c Fri Jun 18 11:05:43 2004 @@ -691,6 +691,8 @@ usb_unlink_urb(acm->readurb); usb_unlink_urb(acm->writeurb); + flush_scheduled_work(); /* wait for acm_softint */ + kfree(acm->ctrlurb->transfer_buffer); usb_driver_release_interface(&acm_driver, acm->data);