summaryrefslogtreecommitdiffstats
path: root/mm/hmm.c
diff options
context:
space:
mode:
authorKuehling, Felix2019-05-10 21:53:24 +0200
committerJason Gunthorpe2019-06-06 21:31:41 +0200
commit9b1ae605c8e295836050fa6eaf720131db2fac73 (patch)
treeb2ac18bc0976f6267bce953fc0f826dc104821d0 /mm/hmm.c
parentmm/hmm: support automatic NUMA balancing (diff)
downloadkernel-qcow2-linux-9b1ae605c8e295836050fa6eaf720131db2fac73.tar.gz
kernel-qcow2-linux-9b1ae605c8e295836050fa6eaf720131db2fac73.tar.xz
kernel-qcow2-linux-9b1ae605c8e295836050fa6eaf720131db2fac73.zip
mm/hmm: Only set FAULT_FLAG_ALLOW_RETRY for non-blocking
Don't set this flag by default in hmm_vma_do_fault. It is set conditionally just a few lines below. Setting it unconditionally can lead to handle_mm_fault doing a non-blocking fault, returning -EBUSY and unlocking mmap_sem unexpectedly. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Jérôme Glisse <jglisse@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'mm/hmm.c')
-rw-r--r--mm/hmm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hmm.c b/mm/hmm.c
index dce4e70e648a..826816ab2377 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -328,7 +328,7 @@ struct hmm_vma_walk {
static int hmm_vma_do_fault(struct mm_walk *walk, unsigned long addr,
bool write_fault, uint64_t *pfn)
{
- unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_REMOTE;
+ unsigned int flags = FAULT_FLAG_REMOTE;
struct hmm_vma_walk *hmm_vma_walk = walk->private;
struct hmm_range *range = hmm_vma_walk->range;
struct vm_area_struct *vma = walk->vma;