diff options
author | Oliver Neukum <oneukum@suse.com> | 2019-08-01 09:40:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-16 10:10:53 +0200 |
commit | c7a87aff3ed1e6741adb6d0217e448c08a13f1e6 (patch) | |
tree | 1dbc4ec2f51593910643972e349719d3edf90b0b /drivers/input | |
parent | e056b2f09bdf52cbae915f19544dd9335a0cbcbe (diff) | |
download | linux-stable-c7a87aff3ed1e6741adb6d0217e448c08a13f1e6.tar.gz linux-stable-c7a87aff3ed1e6741adb6d0217e448c08a13f1e6.tar.bz2 linux-stable-c7a87aff3ed1e6741adb6d0217e448c08a13f1e6.zip |
Input: usbtouchscreen - initialize PM mutex before using it
commit b55d996f057bf2e7ba9422a80b5e17e99860cb0b upstream.
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>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index a2cec6cacf57..16d70201de4a 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1659,6 +1659,8 @@ static int usbtouch_probe(struct usb_interface *intf, if (!usbtouch || !input_dev) goto out_free; + mutex_init(&usbtouch->pm_mutex); + type = &usbtouch_dev_info[id->driver_info]; usbtouch->type = type; if (!type->process_pkt) |