|
@@ -758,9 +758,13 @@ static void ffs_user_copy_worker(struct work_struct *work)
|
|
bool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;
|
|
bool kiocb_has_eventfd = io_data->kiocb->ki_flags & IOCB_EVENTFD;
|
|
|
|
|
|
if (io_data->read && ret > 0) {
|
|
if (io_data->read && ret > 0) {
|
|
|
|
+ mm_segment_t oldfs = get_fs();
|
|
|
|
+
|
|
|
|
+ set_fs(USER_DS);
|
|
use_mm(io_data->mm);
|
|
use_mm(io_data->mm);
|
|
ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data);
|
|
ret = ffs_copy_to_iter(io_data->buf, ret, &io_data->data);
|
|
unuse_mm(io_data->mm);
|
|
unuse_mm(io_data->mm);
|
|
|
|
+ set_fs(oldfs);
|
|
}
|
|
}
|
|
|
|
|
|
io_data->kiocb->ki_complete(io_data->kiocb, ret, ret);
|
|
io_data->kiocb->ki_complete(io_data->kiocb, ret, ret);
|