* usb: printer double up()
@ 2005-07-25 19:50 Pete Zaitcev
0 siblings, 0 replies; only message in thread
From: Pete Zaitcev @ 2005-07-25 19:50 UTC (permalink / raw)
To: marcelo.tosatti; +Cc: zaitcev, linux-kernel
Doing a double up() is actually safe in Linux, but still, it's a bug.
This fix is present in 2.6.13-rc3.
By Domen Puncer <domen@coderock.org>
up(&usblp->sem) was called twice in a row in this code path.
--- linux-2.4.31/drivers/usb/printer.c 2004-08-10 13:43:36.000000000 -0700
+++ linux-2.4.31-usb/drivers/usb/printer.c 2005-06-05 11:21:12.000000000 -0700
@@ -740,6 +740,7 @@ static ssize_t usblp_read(struct file *f
schedule();
} else {
set_current_state(TASK_RUNNING);
+ down (&usblp->sem);
break;
}
down (&usblp->sem);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-25 19:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-25 19:50 usb: printer double up() Pete Zaitcev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®