2.4.36-stable kernel tree
Revision | d09a5eedeb892779ebda1dbc059cb1e0ab79a2cd (tree) |
---|---|
Zeit | 2005-07-26 03:12:30 |
Autor | Pete Zaitcev <zaitcev@redh...> |
Commiter | Marcelo Tosatti |
[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 <domen@coderock.org>
up(&usblp->sem) was called twice in a row in this code path.
@@ -740,6 +740,7 @@ static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t | ||
740 | 740 | schedule(); |
741 | 741 | } else { |
742 | 742 | set_current_state(TASK_RUNNING); |
743 | + down (&usblp->sem); | |
743 | 744 | break; |
744 | 745 | } |
745 | 746 | down (&usblp->sem); |