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().
Unified · Split
| @@ -421,7 +421,7 @@ static int evdev_open(struct inode *inode, struct file *file) · 420 unmodified lines | ||
| 421 | 421 | |
| 422 | 422 | err_free_client: |
| 423 | 423 | evdev_detach_client(evdev, client); |
| 424 | − kfree(client); | |
| 424 | + kvfree(client); | |
| 425 | 425 | return error; |
| 426 | 426 | } |
| 427 | 427 | |