diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-06-02 12:28:16 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-06-02 12:28:16 -0400 |
commit | 3999c3a7fd25a737a48243a55684ade4233b8180 (patch) | |
tree | 29032035759936281bf37207204bc4e81c17f1bf | |
parent | d635cafc6ede311a26c8e358dcc5dfa3592d9815 (diff) | |
download | longterm-queue-4.8-3999c3a7fd25a737a48243a55684ade4233b8180.tar.gz |
dax: drop patch not applicable to 4.8.x
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/device-dax-fix-pmd-pte-fault-fallback-handling.patch | 99 | ||||
-rw-r--r-- | queue/series | 1 |
2 files changed, 0 insertions, 100 deletions
diff --git a/queue/device-dax-fix-pmd-pte-fault-fallback-handling.patch b/queue/device-dax-fix-pmd-pte-fault-fallback-handling.patch deleted file mode 100644 index 159e779..0000000 --- a/queue/device-dax-fix-pmd-pte-fault-fallback-handling.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 0134ed4fb9e78672ee9f7b18007114404c81e63f Mon Sep 17 00:00:00 2001 -From: Dave Jiang <dave.jiang@intel.com> -Date: Fri, 10 Mar 2017 13:24:22 -0700 -Subject: [PATCH] device-dax: fix pmd/pte fault fallback handling - -commit 0134ed4fb9e78672ee9f7b18007114404c81e63f upstream. - -Jeff Moyer reports: - - With a device dax alignment of 4KB or 2MB, I get sigbus when running - the attached fio job file for the current kernel (4.11.0-rc1+). If - I specify an alignment of 1GB, it works. - - I turned on debug output, and saw that it was failing in the huge - fault code. - - dax dax1.0: dax_open - dax dax1.0: dax_mmap - dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - - dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf60 - dax dax1.0: dax_release - - fio config for reproduce: - [global] - ioengine=dev-dax - direct=0 - filename=/dev/dax0.0 - bs=2m - - [write] - rw=write - - [read] - stonewall - rw=read - -The driver fails to fallback when taking a fault that is larger than -the device alignment, or handling a larger fault when a smaller -mapping is already established. While we could support larger -mappings for a device with a smaller alignment, that change is -too large for the immediate fix. The simplest change is to force -fallback until the fault size matches the alignment. - -Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") -Cc: <stable@vger.kernel.org> -Reported-by: Jeff Moyer <jmoyer@redhat.com> -Signed-off-by: Dave Jiang <dave.jiang@intel.com> -Signed-off-by: Dan Williams <dan.j.williams@intel.com> - -diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c -index 8d9829ff2a78..a284dc532e46 100644 ---- a/drivers/dax/dax.c -+++ b/drivers/dax/dax.c -@@ -427,6 +427,7 @@ static int __dax_dev_pte_fault(struct dax_dev *dax_dev, struct vm_fault *vmf) - int rc = VM_FAULT_SIGBUS; - phys_addr_t phys; - pfn_t pfn; -+ unsigned int fault_size = PAGE_SIZE; - - if (check_vma(dax_dev, vmf->vma, __func__)) - return VM_FAULT_SIGBUS; -@@ -437,6 +438,9 @@ static int __dax_dev_pte_fault(struct dax_dev *dax_dev, struct vm_fault *vmf) - return VM_FAULT_SIGBUS; - } - -+ if (fault_size != dax_region->align) -+ return VM_FAULT_SIGBUS; -+ - phys = pgoff_to_phys(dax_dev, vmf->pgoff, PAGE_SIZE); - if (phys == -1) { - dev_dbg(dev, "%s: phys_to_pgoff(%#lx) failed\n", __func__, -@@ -464,6 +468,7 @@ static int __dax_dev_pmd_fault(struct dax_dev *dax_dev, struct vm_fault *vmf) - phys_addr_t phys; - pgoff_t pgoff; - pfn_t pfn; -+ unsigned int fault_size = PMD_SIZE; - - if (check_vma(dax_dev, vmf->vma, __func__)) - return VM_FAULT_SIGBUS; -@@ -480,6 +485,16 @@ static int __dax_dev_pmd_fault(struct dax_dev *dax_dev, struct vm_fault *vmf) - return VM_FAULT_SIGBUS; - } - -+ if (fault_size < dax_region->align) -+ return VM_FAULT_SIGBUS; -+ else if (fault_size > dax_region->align) -+ return VM_FAULT_FALLBACK; -+ -+ /* if we are outside of the VMA */ -+ if (pmd_addr < vmf->vma->vm_start || -+ (pmd_addr + PMD_SIZE) > vmf->vma->vm_end) -+ return VM_FAULT_SIGBUS; -+ - pgoff = linear_page_index(vmf->vma, pmd_addr); - phys = pgoff_to_phys(dax_dev, pgoff, PMD_SIZE); - if (phys == -1) { --- -2.12.0 - diff --git a/queue/series b/queue/series index 5c637e4..1d9e06f 100644 --- a/queue/series +++ b/queue/series @@ -83,7 +83,6 @@ blk-mq-don-t-complete-un-started-request-in-timeout-.patch intel_th-Don-t-leak-module-refcount-on-failure-to-ac.patch Drivers-hv-vmbus-Don-t-leak-channel-ids.patch libceph-don-t-set-weight-to-IN-when-OSD-is-destroyed.patch -device-dax-fix-pmd-pte-fault-fallback-handling.patch drm-bridge-analogix-dp-Fix-runtime-PM-state-on-drive.patch nl80211-fix-dumpit-error-path-RTNL-deadlocks.patch drm-reference-count-event-completion.patch |