drivers/input/evdev.c: don't kfree() a vmalloc address
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Dec 2014 23:59:31 +0000 (15:59 -0800)
committerVinayak Pane <vpane@nvidia.com>
Tue, 11 Apr 2017 20:46:28 +0000 (13:46 -0700)
commit7b2c24c40c66f207bb492c56b443dcfff94a46f2
tree7a3ef40fe72c61eed591b001be2816fb6271c86d
parentc8cf0d231fdbbdd635e91421c15b554d8772142e
drivers/input/evdev.c: don't kfree() a vmalloc address

If kzalloc() failed and then evdev_open_device() fails, evdev_open()
will pass a vmalloc'ed pointer to kfree.

This might fix https://bugzilla.kernel.org/show_bug.cgi?id=88401, where
there was a crash in kfree().

Bug 1901485

Change-Id: I090226511af6b11e374f08b8d2e92933bcace9c2
Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Belatedly-Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-on: http://git-master/r/1460832
Reviewed-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
Tested-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
drivers/input/evdev.c