diff --git a/kernel/ksud.c b/kernel/ksud.c index b817e9d3..08ab1575 100644 --- a/kernel/ksud.c +++ b/kernel/ksud.c @@ -388,11 +388,13 @@ int ksu_handle_vfs_read(struct file **file_ptr, char __user **buf_ptr, int ksu_handle_sys_read(unsigned int fd, char __user **buf_ptr, size_t *count_ptr) { - struct file *file = fget_raw(fd); + struct file *file = fget(fd); if (!file) { return 0; } - return ksu_handle_vfs_read(&file, buf_ptr, count_ptr, NULL); + int result = ksu_handle_vfs_read(&file, buf_ptr, count_ptr, NULL); + fput(file); + return result; } static unsigned int volumedown_pressed_count = 0;