Message ID | 20190730104717.31831-1-oneukum@suse.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b55d996f057bf2e7ba9422a80b5e17e99860cb0b |
Headers | show |
Series | usbtouchscreen: add proper initialization | expand |
On Tue, Jul 30, 2019 at 12:47:17PM +0200, Oliver Neukum wrote: > Mutexes shall be initialized before they are used. > > Fixes: 12e510dbc57b2 ("Input: usbtouchscreen - fix deadlock in autosuspend") > Reported-by: syzbot+199ea16c7f26418b4365@syzkaller.appspotmail.com > Signed-off-by: Oliver Neukum <oneukum@suse.com> Applied, thank you. > --- > drivers/input/touchscreen/usbtouchscreen.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c > index a2cec6cacf57..caacf211f51b 100644 > --- a/drivers/input/touchscreen/usbtouchscreen.c > +++ b/drivers/input/touchscreen/usbtouchscreen.c > @@ -1658,6 +1658,7 @@ static int usbtouch_probe(struct usb_interface *intf, > input_dev = input_allocate_device(); > if (!usbtouch || !input_dev) > goto out_free; > + mutex_init(&usbtouch->pm_mutex); > > type = &usbtouch_dev_info[id->driver_info]; > usbtouch->type = type; > -- > 2.16.4 >
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index a2cec6cacf57..caacf211f51b 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1658,6 +1658,7 @@ static int usbtouch_probe(struct usb_interface *intf, input_dev = input_allocate_device(); if (!usbtouch || !input_dev) goto out_free; + mutex_init(&usbtouch->pm_mutex); type = &usbtouch_dev_info[id->driver_info]; usbtouch->type = type;
Mutexes shall be initialized before they are used. Fixes: 12e510dbc57b2 ("Input: usbtouchscreen - fix deadlock in autosuspend") Reported-by: syzbot+199ea16c7f26418b4365@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum <oneukum@suse.com> --- drivers/input/touchscreen/usbtouchscreen.c | 1 + 1 file changed, 1 insertion(+)