Merge branch 'akpm' (patches from Andrew)
Merge some more updates from Andrew Morton: - various hotfixes and minor things - hch's use_mm/unuse_mm clearnups Subsystems affected by this patch series: mm/hugetlb, scripts, kcov, lib, nilfs, checkpatch, lib, mm/debug, ocfs2, lib, misc. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: kernel: set USER_DS in kthread_use_mm kernel: better document the use_mm/unuse_mm API contract kernel: move use_mm/unuse_mm to kthread.c kernel: move use_mm/unuse_mm to kthread.c stacktrace: cleanup inconsistent variable type lib: test get_count_order/long in test_bitops.c mm: add comments on pglist_data zones ocfs2: fix spelling mistake and grammar mm/debug_vm_pgtable: fix kernel crash by checking for THP support lib: fix bitmap_parse() on 64-bit big endian archs checkpatch: correct check for kernel parameters doc nilfs2: fix null pointer dereference at nilfs_segctor_do_construct() lib/lz4/lz4_decompress.c: document deliberate use of `&' kcov: check kcov_softirq in kcov_remote_stop() scripts/spelling: add a few more typos khugepaged: selftests: fix timeout condition in wait_for_scan()
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include <linux/vhost.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mmu_context.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/poll.h>
|
||||
@@ -335,10 +334,8 @@ static int vhost_worker(void *data)
|
||||
struct vhost_dev *dev = data;
|
||||
struct vhost_work *work, *work_next;
|
||||
struct llist_node *node;
|
||||
mm_segment_t oldfs = get_fs();
|
||||
|
||||
set_fs(USER_DS);
|
||||
use_mm(dev->mm);
|
||||
kthread_use_mm(dev->mm);
|
||||
|
||||
for (;;) {
|
||||
/* mb paired w/ kthread_stop */
|
||||
@@ -366,8 +363,7 @@ static int vhost_worker(void *data)
|
||||
schedule();
|
||||
}
|
||||
}
|
||||
unuse_mm(dev->mm);
|
||||
set_fs(oldfs);
|
||||
kthread_unuse_mm(dev->mm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user