linux-stable/drivers/infiniband/hw
Jason Gunthorpe b9358bdbc7 RDMA/mlx5: Fix locking in MR cache work queue
All of the members of mlx5_cache_ent must be accessed while holding the
spinlock, add the missing spinlock in the __cache_work_func().

Using cache->stopped and flush_workqueue() is an inherently racy way to
shutdown self-scheduling work on a queue. Replace it with ent->disabled
under lock, and always check disabled before queuing any new work. Use
cancel_work_sync() to shutdown the queue.

Use READ_ONCE/WRITE_ONCE for dev->last_add to manage concurrency as
coherency is less important here.

Split fill_delay from the bitfield. C bitfield updates are not atomic and
this is just a mess. Use READ_ONCE/WRITE_ONCE, but this could also use
test_bit()/set_bit().

Link: https://lore.kernel.org/r/20200310082238.239865-11-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-03-13 11:08:02 -03:00
..
bnxt_re RDMA subsystem updates for 5.6 2020-01-31 14:40:36 -08:00
cxgb4 RDMA/iw_cxgb4: initiate CLOSE when entering TERM 2020-02-11 14:28:00 -04:00
efa RDMA/efa: Mask access flags with the correct optional range 2020-01-29 16:41:05 -04:00
hfi1 IB/hfi1: Close window for pq and request coliding 2020-02-11 11:41:31 -04:00
hns Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
i40iw Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
mlx4 IB/mlx4: Fix leak in id_map_find_del 2020-01-27 16:46:53 -04:00
mlx5 RDMA/mlx5: Fix locking in MR cache work queue 2020-03-13 11:08:02 -03:00
mthca mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
ocrdma IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
qedr Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
qib mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
usnic mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
vmw_pvrdma IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00