summaryrefslogtreecommitdiffstats
path: root/drivers/dax
diff options
context:
space:
mode:
authorPushkar Jambhlekar <pushkar.iit@gmail.com>2017-04-11 18:12:25 +0200
committerDan Williams <dan.j.williams@intel.com>2017-04-13 06:59:13 +0200
commit54eafcc9e339affb8982fd21e1fc4aa4a036655b (patch)
tree07a660bb3a05894e2f44988f836d25509397c3fc /drivers/dax
parentMerge branch 'for-4.11/libnvdimm' into for-4.12/dax (diff)
downloadlinux-54eafcc9e339affb8982fd21e1fc4aa4a036655b.tar.xz
linux-54eafcc9e339affb8982fd21e1fc4aa4a036655b.zip
device-dax: fix dax_dev_huge_fault() unknown fault size handling
The default case for dax_dev_huge_fault() fault size handling mistakenly returns when it should unlock. This is not a problem in practice since the only three possible fault sizes are handled. Going forward, if the core mm adds a new fault size beyond pte, pmd, or pud device-dax should abort VM_FAULT_SIGBUS requests not VM_FAULT_FALLBACK since device-dax guarantees a configured fault granularity for all faults. Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/dax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c
index 19795eb35579..94036d92ed16 100644
--- a/drivers/dax/dax.c
+++ b/drivers/dax/dax.c
@@ -591,7 +591,7 @@ static int dax_dev_huge_fault(struct vm_fault *vmf,
rc = __dax_dev_pud_fault(dax_dev, vmf);
break;
default:
- return VM_FAULT_FALLBACK;
+ rc = VM_FAULT_SIGBUS;
}
srcu_read_unlock(&dax_srcu, id);