1. 23 10月, 2019 6 次提交
  2. 05 10月, 2019 1 次提交
  3. 02 10月, 2019 1 次提交
  4. 01 10月, 2019 1 次提交
  5. 25 9月, 2019 1 次提交
    • A
      mm/gup: add make_dirty arg to put_user_pages_dirty_lock() · 2d15eb31
      akpm@linux-foundation.org 提交于
      [11~From: John Hubbard <jhubbard@nvidia.com>
      Subject: mm/gup: add make_dirty arg to put_user_pages_dirty_lock()
      
      Patch series "mm/gup: add make_dirty arg to put_user_pages_dirty_lock()",
      v3.
      
      There are about 50+ patches in my tree [2], and I'll be sending out the
      remaining ones in a few more groups:
      
      * The block/bio related changes (Jerome mostly wrote those, but I've had
        to move stuff around extensively, and add a little code)
      
      * mm/ changes
      
      * other subsystem patches
      
      * an RFC that shows the current state of the tracking patch set.  That
        can only be applied after all call sites are converted, but it's good to
        get an early look at it.
      
      This is part a tree-wide conversion, as described in fc1d8e7c ("mm:
      introduce put_user_page*(), placeholder versions").
      
      This patch (of 3):
      
      Provide more capable variation of put_user_pages_dirty_lock(), and delete
      put_user_pages_dirty().  This is based on the following:
      
      1.  Lots of call sites become simpler if a bool is passed into
         put_user_page*(), instead of making the call site choose which
         put_user_page*() variant to call.
      
      2.  Christoph Hellwig's observation that set_page_dirty_lock() is
         usually correct, and set_page_dirty() is usually a bug, or at least
         questionable, within a put_user_page*() calling chain.
      
      This leads to the following API choices:
      
          * put_user_pages_dirty_lock(page, npages, make_dirty)
      
          * There is no put_user_pages_dirty(). You have to
            hand code that, in the rare case that it's
            required.
      
      [jhubbard@nvidia.com: remove unused variable in siw_free_plist()]
        Link: http://lkml.kernel.org/r/20190729074306.10368-1-jhubbard@nvidia.com
      Link: http://lkml.kernel.org/r/20190724044537.10458-2-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d15eb31
  6. 21 9月, 2019 1 次提交
  7. 17 9月, 2019 1 次提交
  8. 14 9月, 2019 2 次提交
  9. 28 8月, 2019 1 次提交
  10. 22 8月, 2019 12 次提交
  11. 21 8月, 2019 6 次提交
  12. 16 8月, 2019 1 次提交
  13. 12 8月, 2019 3 次提交
  14. 08 8月, 2019 2 次提交
    • M
      RDMA/counter: Prevent QP counter binding if counters unsupported · d97de888
      Mark Zhang 提交于
      In case of rdma_counter_init() fails, counter allocation and QP bind
      should not be allowed.
      
      Fixes: 413d3347 ("RDMA/counter: Add set/clear per-port auto mode support")
      Fixes: 1bd8e0a9 ("RDMA/counter: Allow manual mode configuration support")
      Signed-off-by: NMark Zhang <markz@mellanox.com>
      Reviewed-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Link: https://lore.kernel.org/r/20190807101819.7581-1-leon@kernel.orgSigned-off-by: NDoug Ledford <dledford@redhat.com>
      d97de888
    • Y
      IB/mlx5: Fix implicit MR release flow · f591822c
      Yishai Hadas 提交于
      Once implicit MR is being called to be released by
      ib_umem_notifier_release() its leaves were marked as "dying".
      
      However, when dereg_mr()->mlx5_ib_free_implicit_mr()->mr_leaf_free() is
      called, it skips running the mr_leaf_free_action (i.e. umem_odp->work)
      when those leaves were marked as "dying".
      
      As such ib_umem_release() for the leaves won't be called and their MRs
      will be leaked as well.
      
      When an application exits/killed without calling dereg_mr we might hit the
      above flow.
      
      This fatal scenario is reported by WARN_ON() upon
      mlx5_ib_dealloc_ucontext() as ibcontext->per_mm_list is not empty, the
      call trace can be seen below.
      
      Originally the "dying" mark as part of ib_umem_notifier_release() was
      introduced to prevent pagefault_mr() from returning a success response
      once this happened. However, we already have today the completion
      mechanism so no need for that in those flows any more.  Even in case a
      success response will be returned the firmware will not find the pages and
      an error will be returned in the following call as a released mm will
      cause ib_umem_odp_map_dma_pages() to permanently fail mmget_not_zero().
      
      Fix the above issue by dropping the "dying" from the above flows.  The
      other flows that are using "dying" are still needed it for their
      synchronization purposes.
      
         WARNING: CPU: 1 PID: 7218 at
         drivers/infiniband/hw/mlx5/main.c:2004
      		  mlx5_ib_dealloc_ucontext+0x84/0x90 [mlx5_ib]
         CPU: 1 PID: 7218 Comm: ibv_rc_pingpong Tainted: G     E
      	       5.2.0-rc6+ #13
         Call Trace:
         uverbs_destroy_ufile_hw+0xb5/0x120 [ib_uverbs]
         ib_uverbs_close+0x1f/0x80 [ib_uverbs]
         __fput+0xbe/0x250
         task_work_run+0x88/0xa0
         do_exit+0x2cb/0xc30
         ? __fput+0x14b/0x250
         do_group_exit+0x39/0xb0
         get_signal+0x191/0x920
         ? _raw_spin_unlock_bh+0xa/0x20
         ? inet_csk_accept+0x229/0x2f0
         do_signal+0x36/0x5e0
         ? put_unused_fd+0x5b/0x70
         ? __sys_accept4+0x1a6/0x1e0
         ? inet_hash+0x35/0x40
         ? release_sock+0x43/0x90
         ? _raw_spin_unlock_bh+0xa/0x20
         ? inet_listen+0x9f/0x120
         exit_to_usermode_loop+0x5c/0xc6
         do_syscall_64+0x182/0x1b0
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 81713d37 ("IB/mlx5: Add implicit MR support")
      Link: https://lore.kernel.org/r/20190805083010.21777-1-leon@kernel.orgSigned-off-by: NYishai Hadas <yishaih@mellanox.com>
      Reviewed-by: NArtemy Kovalyov <artemyko@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      f591822c
  15. 05 8月, 2019 1 次提交