From: Andrew Morton Date: Tue, 2 Dec 2014 23:59:31 +0000 (-0800) Subject: drivers/input/evdev.c: don't kfree() a vmalloc address X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92788ac1eb06e69a822de45e2a8a63fa45eb5be2;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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(). Reported-by: Christian Casteyde Belatedly-Acked-by: Dmitry Torokhov Cc: Henrik Rydberg Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index bc203485716d..8afa28e4570e 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -421,7 +421,7 @@ static int evdev_open(struct inode *inode, struct file *file) err_free_client: evdev_detach_client(evdev, client); - kfree(client); + kvfree(client); return error; }