Commit d7ffde35 authored by Jens Freimann's avatar Jens Freimann Committed by David S. Miller

vhost: use USER_DS in vhost_worker thread

On some architectures address spaces are set up in a way that this is
not necessary to work properly but on some others (like s390) it is.
Make sure we operate on the user address space to allow copy_xxx_user()
from the vhost_worker() thread by setting it explicitly before calling
use_mm() and revert it after unuse_mm().
Signed-off-by: default avatarJens Freimann <>
Signed-off-by: default avatarChristian Borntraeger <>
Acked-by: default avatarMichael S. Tsirkin <>
Signed-off-by: default avatarDavid S. Miller <>
parent 57efd44c
......@@ -191,7 +191,9 @@ static int vhost_worker(void *data)
struct vhost_dev *dev = data;
struct vhost_work *work = NULL;
unsigned uninitialized_var(seq);
mm_segment_t oldfs = get_fs();
for (;;) {
......@@ -229,6 +231,7 @@ static int vhost_worker(void *data)
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment