]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:37:05 +0000 (09:37 -0800)
commit3abaac9510bbdf474567e19b6bb5c32e5260d2bd
treef1a3308186c6ca2f828a17ab967bb2b14ce32f90
parent1b543987277fe14880526e88cc77fa72e1c3db38
drivers/input/evdev.c: don't kfree() a vmalloc address

commit 92788ac1eb06e69a822de45e2a8a63fa45eb5be2 upstream.

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().

Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Belatedly-Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/evdev.c