Re: [PATCH 1/1] usblp: do not set TASK_INTERRUPTIBLE before lock

2015-11-11 Thread Pete Zaitcev
On Mon, 2 Nov 2015 10:27:00 +0100 Jiri Slaby wrote: > Signed-off-by: Jiri Slaby > --- a/drivers/usb/class/usblp.c > +++ b/drivers/usb/class/usblp.c > @@ -884,11 +884,11 @@ static int usblp_wwait(struct usblp *usblp, int > nonblock) > > add_wait_queue(&usblp->wwait, &waita); > for

[PATCH 1/1] usblp: do not set TASK_INTERRUPTIBLE before lock

2015-11-02 Thread Jiri Slaby
It is not permitted to set task state before lock. usblp_wwait sets the state to TASK_INTERRUPTIBLE and calls mutex_lock_interruptible. Upon return from that function, the state will be TASK_RUNNING again. This is clearly a bug and a warning is generated with LOCKDEP too: WARNING: CPU: 1 PID: 5109