1. 25 May, 2019 36 commits
  2. 22 May, 2019 4 commits
    • Greg Kroah-Hartman's avatar
      Linux 5.1.4 · e0e8106a
      Greg Kroah-Hartman authored
      e0e8106a
    • Martin Schwidefsky's avatar
      s390/mm: convert to the generic get_user_pages_fast code · ee4c3e28
      Martin Schwidefsky authored
      commit 1a42010c upstream.
      
      Define the gup_fast_permitted to check against the asce_limit of the
      mm attached to the current task, then replace the s390 specific gup
      code with the generic implementation in mm/gup.c.
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ee4c3e28
    • Martin Schwidefsky's avatar
      s390/mm: make the pxd_offset functions more robust · 8b066d00
      Martin Schwidefsky authored
      commit d1874a0c upstream.
      
      Change the way how pgd_offset, p4d_offset, pud_offset and pmd_offset
      walk the page tables. pgd_offset now always calculates the index for
      the top-level page table and adds it to the pgd, this is either a
      segment table offset for a 2-level setup, a region-3 offset for 3-levels,
      region-2 offset for 4-levels, or a region-1 offset for a 5-level setup.
      The other three functions p4d_offset, pud_offset and pmd_offset will
      only add the respective offset if they dereference the passed pointer.
      
      With the new way of walking the page tables a sequence like this from
      mm/gup.c now works:
      
           pgdp = pgd_offset(current->mm, addr);
           pgd = READ_ONCE(*pgdp);
           p4dp = p4d_offset(&pgd, addr);
           p4d = READ_ONCE(*p4dp);
           pudp = pud_offset(&p4d, addr);
           pud = READ_ONCE(*pudp);
           pmdp = pmd_offset(&pud, addr);
           pmd = READ_ONCE(*pmdp);
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8b066d00
    • Dan Williams's avatar
      libnvdimm/namespace: Fix label tracking error · 550f5ba1
      Dan Williams authored
      commit c4703ce1 upstream.
      
      Users have reported intermittent occurrences of DIMM initialization
      failures due to duplicate allocations of address capacity detected in
      the labels, or errors of the form below, both have the same root cause.
      
          nd namespace1.4: failed to track label: 0
          WARNING: CPU: 17 PID: 1381 at drivers/nvdimm/label.c:863
      
          RIP: 0010:__pmem_label_update+0x56c/0x590 [libnvdimm]
          Call Trace:
           ? nd_pmem_namespace_label_update+0xd6/0x160 [libnvdimm]
           nd_pmem_namespace_label_update+0xd6/0x160 [libnvdimm]
           uuid_store+0x17e/0x190 [libnvdimm]
           kernfs_fop_write+0xf0/0x1a0
           vfs_write+0xb7/0x1b0
           ksys_write+0x57/0xd0
           do_syscall_64+0x60/0x210
      
      Unfortunately those reports were typically with a busy parallel
      namespace creation / destruction loop making it difficult to see the
      components of the bug. However, Jane provided a simple reproducer using
      the work-in-progress sub-section implementation.
      
      When ndctl is reconfiguring a namespace it may take an existing defunct
      / disabled namespace and reconfigure it with a new uuid and other
      parameters. Critically namespace_update_uuid() takes existing address
      resources and renames them for the new namespace to use / reconfigure as
      it sees fit. The bug is that this rename only happens in the resource
      tracking tree. Existing labels with the old uuid are not reaped leading
      to a scenario where multiple active labels reference the same span of
      address range.
      
      Teach namespace_update_uuid() to flag any references to the old uuid for
      reaping at the next label update attempt.
      
      Cc: <stable@vger.kernel.org>
      Fixes: bf9bccc1 ("libnvdimm: pmem label sets and namespace instantiation")
      Link: https://github.com/pmem/ndctl/issues/91Reported-by: default avatarJane Chu <jane.chu@oracle.com>
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Reported-by: default avatarErwin Tsaur <erwin.tsaur@oracle.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      550f5ba1