1. 09 1月, 2018 6 次提交
  2. 06 1月, 2018 2 次提交
  3. 29 12月, 2017 4 次提交
  4. 28 12月, 2017 2 次提交
  5. 23 12月, 2017 1 次提交
    • V
      IB/SA: Check dlid before SA agent queries for ClassPortInfo · af808ece
      Venkata Sandeep Dhanalakota 提交于
      SA queries SM for class port info when there is a LID_CHANGE event.
      
      When a base lid is configured before fm is started ie when smlid is
      not yet assigned, SA handles the LID_CHANGE event and tries query SM
      with lid 0. This will cause an hang.
      
      [ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds.
      [ 1106.965082] Tainted: G O 4.12.0+ #1
      [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
       this message.
      [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000
      [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core]
      [ 1106.977261] Call Trace:
      [ 1106.977273] __schedule+0x28e/0x860
      [ 1106.977285] schedule+0x36/0x80
      [ 1106.977298] schedule_timeout+0x1a3/0x2e0
      [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20
      [ 1106.977322] ? idr_alloc+0x64/0x90
      [ 1106.977334] wait_for_completion+0xe3/0x140
      [ 1106.977347] ? wake_up_q+0x80/0x80
      [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core]
      [ 1106.977381] process_one_work+0x147/0x370
      [ 1106.977394] worker_thread+0x4a/0x390
      [ 1106.977406] kthread+0x109/0x140
      [ 1106.977418] ? process_one_work+0x370/0x370
      [ 1106.977430] ? kthread_park+0x60/0x60
      [ 1106.977443] ret_from_fork+0x22/0x30
      
      Always ensure a proper smlid is assigned before querying SM for cpi.
      
      Fixes: ee1c60b1 ("IB/SA: Modify SA to implicitly cache Class Port info")
      Reviewed-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NVenkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      af808ece
  6. 22 12月, 2017 1 次提交
  7. 19 12月, 2017 6 次提交
  8. 02 12月, 2017 1 次提交
  9. 30 11月, 2017 8 次提交
    • I
      autofs: revert "autofs: fix AT_NO_AUTOMOUNT not being honored" · 5d38f049
      Ian Kent 提交于
      Commit 42f46148 ("autofs: fix AT_NO_AUTOMOUNT not being honored")
      allowed the fstatat(2) system call to properly honor the AT_NO_AUTOMOUNT
      flag but introduced a semantic change.
      
      In order to honor AT_NO_AUTOMOUNT a semantic change was made to the
      negative dentry case for stat family system calls in follow_automount().
      
      This changed the unconditional triggering of an automount in this case
      to no longer be done and an error returned instead.
      
      This has caused more problems than I expected so reverting the change is
      needed.
      
      In a discussion with Neil Brown it was concluded that the automount(8)
      daemon can implement this change without kernel modifications.  So that
      will be done instead and the autofs module documentation updated with a
      description of the problem and what needs to be done by module users for
      this specific case.
      
      Link: http://lkml.kernel.org/r/151174730120.6162.3848002191530283984.stgit@pluto.themaw.net
      Fixes: 42f46148 ("autofs: fix AT_NO_AUTOMOUNT not being honored")
      Signed-off-by: NIan Kent <raven@themaw.net>
      Cc: Neil Brown <neilb@suse.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Colin Walters <walters@redhat.com>
      Cc: Ondrej Holy <oholy@redhat.com>
      Cc: <stable@vger.kernel.org>	[4.11+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5d38f049
    • Z
      mm: migrate: fix an incorrect call of prep_transhuge_page() · 40a899ed
      Zi Yan 提交于
      In https://lkml.org/lkml/2017/11/20/411, Andrea reported that during
      memory hotplug/hot remove prep_transhuge_page() is called incorrectly on
      non-THP pages for migration, when THP is on but THP migration is not
      enabled.  This leads to a bad state of target pages for migration.
      
      By inspecting the code, if called on a non-THP, prep_transhuge_page()
      will
      
       1) change the value of the mapping of (page + 2), since it is used for
          THP deferred list;
      
       2) change the lru value of (page + 1), since it is used for THP's dtor.
      
      Both can lead to data corruption of these two pages.
      
      Andrea said:
       "Pragmatically and from the point of view of the memory_hotplug subsys,
        the effect is a kernel crash when pages are being migrated during a
        memory hot remove offline and migration target pages are found in a
        bad state"
      
      This patch fixes it by only calling prep_transhuge_page() when we are
      certain that the target page is THP.
      
      Link: http://lkml.kernel.org/r/20171121021855.50525-1-zi.yan@sent.com
      Fixes: 8135d892 ("mm: memory_hotplug: memory hotremove supports thp migration")
      Signed-off-by: NZi Yan <zi.yan@cs.rutgers.edu>
      Reported-by: NAndrea Reale <ar@linux.vnet.ibm.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: <stable@vger.kernel.org>	[4.14]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      40a899ed
    • D
      mm: introduce get_user_pages_longterm · 2bb6d283
      Dan Williams 提交于
      Patch series "introduce get_user_pages_longterm()", v2.
      
      Here is a new get_user_pages api for cases where a driver intends to
      keep an elevated page count indefinitely.  This is distinct from usages
      like iov_iter_get_pages where the elevated page counts are transient.
      The iov_iter_get_pages cases immediately turn around and submit the
      pages to a device driver which will put_page when the i/o operation
      completes (under kernel control).
      
      In the longterm case userspace is responsible for dropping the page
      reference at some undefined point in the future.  This is untenable for
      filesystem-dax case where the filesystem is in control of the lifetime
      of the block / page and needs reasonable limits on how long it can wait
      for pages in a mapping to become idle.
      
      Fixing filesystems to actually wait for dax pages to be idle before
      blocks from a truncate/hole-punch operation are repurposed is saved for
      a later patch series.
      
      Also, allowing longterm registration of dax mappings is a future patch
      series that introduces a "map with lease" semantic where the kernel can
      revoke a lease and force userspace to drop its page references.
      
      I have also tagged these for -stable to purposely break cases that might
      assume that longterm memory registrations for filesystem-dax mappings
      were supported by the kernel.  The behavior regression this policy
      change implies is one of the reasons we maintain the "dax enabled.
      Warning: EXPERIMENTAL, use at your own risk" notification when mounting
      a filesystem in dax mode.
      
      It is worth noting the device-dax interface does not suffer the same
      constraints since it does not support file space management operations
      like hole-punch.
      
      This patch (of 4):
      
      Until there is a solution to the dma-to-dax vs truncate problem it is
      not safe to allow long standing memory registrations against
      filesytem-dax vmas.  Device-dax vmas do not have this problem and are
      explicitly allowed.
      
      This is temporary until a "memory registration with layout-lease"
      mechanism can be implemented for the affected sub-systems (RDMA and
      V4L2).
      
      [akpm@linux-foundation.org: use kcalloc()]
      Link: http://lkml.kernel.org/r/151068939435.7446.13560129395419350737.stgit@dwillia2-desk3.amr.corp.intel.com
      Fixes: 3565fce3 ("mm, x86: get_user_pages() for dax mappings")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Suggested-by: NChristoph Hellwig <hch@lst.de>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2bb6d283
    • D
      mm, hugetlbfs: introduce ->split() to vm_operations_struct · 31383c68
      Dan Williams 提交于
      Patch series "device-dax: fix unaligned munmap handling"
      
      When device-dax is operating in huge-page mode we want it to behave like
      hugetlbfs and fail attempts to split vmas into unaligned ranges.  It
      would be messy to teach the munmap path about device-dax alignment
      constraints in the same (hstate) way that hugetlbfs communicates this
      constraint.  Instead, these patches introduce a new ->split() vm
      operation.
      
      This patch (of 2):
      
      The device-dax interface has similar constraints as hugetlbfs in that it
      requires the munmap path to unmap in huge page aligned units.  Rather
      than add more custom vma handling code in __split_vma() introduce a new
      vm operation to perform this vma specific check.
      
      Link: http://lkml.kernel.org/r/151130418135.4029.6783191281930729710.stgit@dwillia2-desk3.amr.corp.intel.com
      Fixes: dee41079 ("/dev/dax, core: file operations and dax-mmap")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31383c68
    • D
      mm: switch to 'define pmd_write' instead of __HAVE_ARCH_PMD_WRITE · e4e40e02
      Dan Williams 提交于
      In response to compile breakage introduced by a series that added the
      pud_write helper to x86, Stephen notes:
      
          did you consider using the other paradigm:
      
          In arch include files:
          #define pud_write       pud_write
          static inline int pud_write(pud_t pud)
           .....
      
          Then in include/asm-generic/pgtable.h:
      
          #ifndef pud_write
          tatic inline int pud_write(pud_t pud)
          {
                  ....
          }
          #endif
      
          If you had, then the powerpc code would have worked ... ;-) and many
          of the other interfaces in include/asm-generic/pgtable.h are
          protected that way ...
      
      Given that some architecture already define pmd_write() as a macro, it's
      a net reduction to drop the definition of __HAVE_ARCH_PMD_WRITE.
      
      Link: http://lkml.kernel.org/r/151129126721.37405.13339850900081557813.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NDan Williams <dan.j.williams@intel.com>
      Suggested-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Oliver OHalloran <oliveroh@au1.ibm.com>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e4e40e02
    • D
      mm: fix device-dax pud write-faults triggered by get_user_pages() · 1501899a
      Dan Williams 提交于
      Currently only get_user_pages_fast() can safely handle the writable gup
      case due to its use of pud_access_permitted() to check whether the pud
      entry is writable.  In the gup slow path pud_write() is used instead of
      pud_access_permitted() and to date it has been unimplemented, just calls
      BUG_ON().
      
          kernel BUG at ./include/linux/hugetlb.h:244!
          [..]
          RIP: 0010:follow_devmap_pud+0x482/0x490
          [..]
          Call Trace:
           follow_page_mask+0x28c/0x6e0
           __get_user_pages+0xe4/0x6c0
           get_user_pages_unlocked+0x130/0x1b0
           get_user_pages_fast+0x89/0xb0
           iov_iter_get_pages_alloc+0x114/0x4a0
           nfs_direct_read_schedule_iovec+0xd2/0x350
           ? nfs_start_io_direct+0x63/0x70
           nfs_file_direct_read+0x1e0/0x250
           nfs_file_read+0x90/0xc0
      
      For now this just implements a simple check for the _PAGE_RW bit similar
      to pmd_write.  However, this implies that the gup-slow-path check is
      missing the extra checks that the gup-fast-path performs with
      pud_access_permitted.  Later patches will align all checks to use the
      'access_permitted' helper if the architecture provides it.
      
      Note that the generic 'access_permitted' helper fallback is the simple
      _PAGE_RW check on architectures that do not define the
      'access_permitted' helper(s).
      
      [dan.j.williams@intel.com: fix powerpc compile error]
        Link: http://lkml.kernel.org/r/151129126165.37405.16031785266675461397.stgit@dwillia2-desk3.amr.corp.intel.com
      Link: http://lkml.kernel.org/r/151043109938.2842.14834662818213616199.stgit@dwillia2-desk3.amr.corp.intel.com
      Fixes: a00cc7d9 ("mm, x86: add support for PUD-sized transparent hugepages")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: Thomas Gleixner <tglx@linutronix.de>	[x86]
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1501899a
    • C
      drm/ttm: fix populate_and_map() functions once more · 1569d651
      Christian König 提交于
      This reverts "drm/ttm: Fix configuration error around populate_and_map()
      functions".
      
      This fix has gone into the wrong direction. Those helpers should be
      available even when neither CONFIG_INTEL_IOMMU nor CONFIG_SWIOTLB are
      set.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1569d651
    • L
      kallsyms: take advantage of the new '%px' format · 668533dc
      Linus Torvalds 提交于
      The conditional kallsym hex printing used a special fixed-width '%lx'
      output (KALLSYM_FMT) in preparation for the hashing of %p, but that
      series ended up adding a %px specifier to help with the conversions.
      
      Use it, and avoid the "print pointer as an unsigned long" code.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      668533dc
  10. 29 11月, 2017 2 次提交
  11. 28 11月, 2017 3 次提交
    • B
      sunrpc: make the function arg as const · d34971a6
      Bhumika Goyal 提交于
      Make the struct cache_detail *tmpl argument of the function
      cache_create_net as const as it is only getting passed to kmemup having
      the argument as const void *.
      Add const to the prototype too.
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      d34971a6
    • L
      Rename superblock flags (MS_xyz -> SB_xyz) · 1751e8a6
      Linus Torvalds 提交于
      This is a pure automated search-and-replace of the internal kernel
      superblock flags.
      
      The s_flags are now called SB_*, with the names and the values for the
      moment mirroring the MS_* flags that they're equivalent to.
      
      Note how the MS_xyz flags are the ones passed to the mount system call,
      while the SB_xyz flags are what we then use in sb->s_flags.
      
      The script to do this was:
      
          # places to look in; re security/*: it generally should *not* be
          # touched (that stuff parses mount(2) arguments directly), but
          # there are two places where we really deal with superblock flags.
          FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
                  include/linux/fs.h include/uapi/linux/bfs_fs.h \
                  security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
          # the list of MS_... constants
          SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
                DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
                POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
                I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
                ACTIVE NOUSER"
      
          SED_PROG=
          for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done
      
          # we want files that contain at least one of MS_...,
          # with fs/namespace.c and fs/pnode.c excluded.
          L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')
      
          for f in $L; do sed -i $f $SED_PROG; done
      Requested-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1751e8a6
    • J
      KVM: Let KVM_SET_SIGNAL_MASK work as advertised · 20b7035c
      Jan H. Schönherr 提交于
      KVM API says for the signal mask you set via KVM_SET_SIGNAL_MASK, that
      "any unblocked signal received [...] will cause KVM_RUN to return with
      -EINTR" and that "the signal will only be delivered if not blocked by
      the original signal mask".
      
      This, however, is only true, when the calling task has a signal handler
      registered for a signal. If not, signal evaluation is short-circuited for
      SIG_IGN and SIG_DFL, and the signal is either ignored without KVM_RUN
      returning or the whole process is terminated.
      
      Make KVM_SET_SIGNAL_MASK behave as advertised by utilizing logic similar
      to that in do_sigtimedwait() to avoid short-circuiting of signals.
      Signed-off-by: NJan H. Schönherr <jschoenh@amazon.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      20b7035c
  12. 27 11月, 2017 1 次提交
  13. 26 11月, 2017 2 次提交
    • D
      uapi: fix linux/kfd_ioctl.h userspace compilation errors · b4d08520
      Dmitry V. Levin 提交于
      Consistently use types provided by <linux/types.h> via <drm/drm.h>
      to fix the following linux/kfd_ioctl.h userspace compilation errors:
      
      /usr/include/linux/kfd_ioctl.h:236:2: error: unknown type name 'uint64_t'
        uint64_t va_addr; /* to KFD */
      /usr/include/linux/kfd_ioctl.h:237:2: error: unknown type name 'uint32_t'
        uint32_t gpu_id; /* to KFD */
      /usr/include/linux/kfd_ioctl.h:238:2: error: unknown type name 'uint32_t'
        uint32_t pad;
      /usr/include/linux/kfd_ioctl.h:243:2: error: unknown type name 'uint64_t'
        uint64_t tile_config_ptr;
      /usr/include/linux/kfd_ioctl.h:245:2: error: unknown type name 'uint64_t'
        uint64_t macro_tile_config_ptr;
      /usr/include/linux/kfd_ioctl.h:249:2: error: unknown type name 'uint32_t'
        uint32_t num_tile_configs;
      /usr/include/linux/kfd_ioctl.h:253:2: error: unknown type name 'uint32_t'
        uint32_t num_macro_tile_configs;
      /usr/include/linux/kfd_ioctl.h:255:2: error: unknown type name 'uint32_t'
        uint32_t gpu_id;  /* to KFD */
      /usr/include/linux/kfd_ioctl.h:256:2: error: unknown type name 'uint32_t'
        uint32_t gb_addr_config; /* from KFD */
      /usr/include/linux/kfd_ioctl.h:257:2: error: unknown type name 'uint32_t'
        uint32_t num_banks;  /* from KFD */
      /usr/include/linux/kfd_ioctl.h:258:2: error: unknown type name 'uint32_t'
        uint32_t num_ranks;  /* from KFD */
      
      Fixes: 6a1c9510 ("drm/amdkfd: Adding new IOCTL for scratch memory v2")
      Fixes: 5d71dbc3 ("drm/amdkfd: Implement image tiling mode support v2")
      Signed-off-by: NDmitry V. Levin <ldv@altlinux.org>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      b4d08520
    • S
      uapi: add SPDX identifier to vm_sockets_diag.h · 7bbefcfa
      Stephen Hemminger 提交于
      New file seems to have missed the SPDX license scan and update.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7bbefcfa
  14. 25 11月, 2017 1 次提交