From 54eafcc9e339affb8982fd21e1fc4aa4a036655b Mon Sep 17 00:00:00 2001 From: Pushkar Jambhlekar Date: Tue, 11 Apr 2017 09:12:25 -0700 Subject: [PATCH] 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 Signed-off-by: Dan Williams --- drivers/dax/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c index 19795eb..94036d9 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); -- 2.7.4