]> www.infradead.org Git - users/dwmw2/linux.git/commit
HID: hiddev: do cleanup in failure of opening a device
authorHillf Danton <hdanton@sina.com>
Tue, 6 Aug 2019 08:40:15 +0000 (16:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:50:07 +0000 (10:50 +0200)
commitd65ca54d05c209571cf2b3913277f75ab477e214
tree6a2416a8ec3d5d4dfdeb01a0a4d71c6d22d12b69
parent4239114d88c9e017139d54c744065842d8271dff
HID: hiddev: do cleanup in failure of opening a device

commit 6d4472d7bec39917b54e4e80245784ea5d60ce49 upstream.

Undo what we did for opening before releasing the memory slice.

Reported-by: syzbot <syzbot+62a1e04fd3ec2abf099e@syzkaller.appspotmail.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/usbhid/hiddev.c