Message ID | 20180619220017.13859-1-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Wed, Jun 20, 2018 at 12:00:17AM +0200, Sebastian Andrzej Siewior wrote: > iforce_get_id_packet() invokes wait_event_interruptible_timeout() which > means it has to be in !atomic context at that point. In !atomic context > it could use GFP_KERNEL instead of GFP_ATOMIC. > Make usb_submit_urb() use GFP_KERNEL. > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> > Cc: linux-input@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Applied, thank you. > --- > drivers/input/joystick/iforce/iforce-packets.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c > index 08f98f2eaf88..fedaaea5c16d 100644 > --- a/drivers/input/joystick/iforce/iforce-packets.c > +++ b/drivers/input/joystick/iforce/iforce-packets.c > @@ -255,7 +255,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) > iforce->cr.bRequest = packet[0]; > iforce->ctrl->dev = iforce->usbdev; > > - status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); > + status = usb_submit_urb(iforce->ctrl, GFP_KERNEL); > if (status) { > dev_err(&iforce->intf->dev, > "usb_submit_urb failed %d\n", status); > -- > 2.17.1 >
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 08f98f2eaf88..fedaaea5c16d 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -255,7 +255,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) iforce->cr.bRequest = packet[0]; iforce->ctrl->dev = iforce->usbdev; - status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); + status = usb_submit_urb(iforce->ctrl, GFP_KERNEL); if (status) { dev_err(&iforce->intf->dev, "usb_submit_urb failed %d\n", status);
iforce_get_id_packet() invokes wait_event_interruptible_timeout() which means it has to be in !atomic context at that point. In !atomic context it could use GFP_KERNEL instead of GFP_ATOMIC. Make usb_submit_urb() use GFP_KERNEL. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/input/joystick/iforce/iforce-packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)