Skip to content

Commit 92788ac

Browse files
akpm00torvalds
authored andcommitted
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 <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>
1 parent 91b5719 commit 92788ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/evdev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static int evdev_open(struct inode *inode, struct file *file)
421421

422422
err_free_client:
423423
evdev_detach_client(evdev, client);
424-
kfree(client);
424+
kvfree(client);
425425
return error;
426426
}
427427

0 commit comments

Comments
 (0)