diff options
| author | Jason Gunthorpe <[email protected]> | 2020-03-10 10:22:36 +0200 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-03-13 11:08:02 -0300 |
| commit | b9358bdbc713cb64b8701bcbd450edc155d761a1 (patch) | |
| tree | cdb14497a0fed7d6d9121dbcaedb5bd6e38f47ed /scripts/gdb/linux/cpus.py | |
| parent | ad2d3ef46d2a88f2906d8d0cc6b912199ec3f1d6 (diff) | |
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/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/cpus.py')
0 files changed, 0 insertions, 0 deletions