diff options
| author | Jason Gunthorpe <jgg@nvidia.com> | 2026-06-04 04:27:43 +0300 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-06-08 20:32:43 +0300 |
| commit | 50d5c02ab8e62325548bd3a6e6b758a9dcd6e7c3 (patch) | |
| tree | c767f2731fbc70c4ba83cda09f8a573acaf854e4 /include/linux/debugobjects.h | |
| parent | ee7a8335069150c3f1893a697ab30bbeca00d796 (diff) | |
| download | linux-50d5c02ab8e62325548bd3a6e6b758a9dcd6e7c3.tar.xz | |
RDMA/nldev: Fix locking when accessing mr->pd
Sashiko points out that, due to rereg_mr, the PD is actually variable and
all the touches in nldev are racy.
Use mr->device instead of mr->pd->device.
Getting the PD restrack ID is more tricky. To avoid disturbing all the
happy paths, add an rdma_restrack_sync() operation which is sort of like
flush_workqueue() or synchronize_irq(): after it returns, all the old
nldev touches to the mr are gone and everything sees the new PD. This
makes it safe to reach into the PD pointer.
Fixes: da5c85078215 ("RDMA/nldev: add driver-specific resource tracking")
Link: https://patch.msgid.link/r/4-v1-29ebd2c229b5+fd5-ib_mr_pd_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
