From oldhamca@gmail.com Thu Jun 2 14:32:27 2005 Message-ID: <216d105c050602141677cb4ccd@mail.gmail.com> Date: Thu, 2 Jun 2005 17:16:34 -0400 From: "C. Adam Oldham" To: greg@kroah.com Subject: USB: Fix race condition in usblp_write Initialize status fields in the read and write urbs to prevent a race condition with open/read/close - open/write/close sequences. Fixes bug #4432 at bugzilla.kernel.org Signed-off-by: Adam Oldham Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/usblp.c | 2 ++ 1 files changed, 2 insertions(+) --- gregkh-2.6.orig/drivers/usb/class/usblp.c 2005-06-01 13:51:14.000000000 -0700 +++ gregkh-2.6/drivers/usb/class/usblp.c 2005-06-05 23:42:36.000000000 -0700 @@ -379,6 +379,8 @@ usblp->writeurb->transfer_buffer_length = 0; usblp->wcomplete = 1; /* we begin writeable */ usblp->rcomplete = 0; + usblp->writeurb->status = 0; + usblp->readurb->status = 0; if (usblp->bidir) { usblp->readcount = 0;