kernel: we should take ownership over fd
This commit is contained in:
@@ -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)
|
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) {
|
if (!file) {
|
||||||
return 0;
|
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;
|
static unsigned int volumedown_pressed_count = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user