tree c86321fcc1fee3924ea1e9f4eebc4609f5dcae4b
parent 451771c40c6a0c44b57d4fbae8d6803e2213fa53
author Pete Zaitcev <[EMAIL PROTECTED]> Tue, 26 Jul 2005 02:50:46 -0700
committer Marcelo Tosatti <[EMAIL PROTECTED]> Mon, 25 Jul 2005 21:12:30 -0300

[PATCH] usb: printer double up()

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 <[EMAIL PROTECTED]>
up(&usblp->sem) was called twice in a row in this code path.

 drivers/usb/printer.c |    1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/usb/printer.c b/drivers/usb/printer.c
--- a/drivers/usb/printer.c
+++ b/drivers/usb/printer.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-24" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to