]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/bnxt_re: Enhance dpi lifecycle logic in doorbell uapis
authorSriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Tue, 19 May 2026 15:00:39 +0000 (20:30 +0530)
committerJason Gunthorpe <jgg@nvidia.com>
Sun, 24 May 2026 15:32:21 +0000 (12:32 -0300)
commit54c01d98f480a5622780cb4d5e893e25dda70e57
tree2edea3fa2be9152623f23aef9df93b7bb5e8cab8
parent73607410f4f1b0d5c3d0af2d70a79c265482a0e3
RDMA/bnxt_re: Enhance dpi lifecycle logic in doorbell uapis

If the DPI is freed when the dbr object is freed, but if the
process has not unmapped the page yet, then the DPI slot could
get reallocated to another process while the original process
still has it mapped. To prevent this, save the DPI info in the
mmap entry during dbr allocation and free the DPI slot from
bnxt_re_mmap_free(), which enures that there are no references
to it.

This change is needed to support doorbell allocation to QPs
in the next patch.

Link: https://patch.msgid.link/r/20260519150041.7251-8-sriharsha.basavapatna@broadcom.com
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.h
drivers/infiniband/hw/bnxt_re/uapi.c