summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ionic/ionic_controlpath.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2025-10-12 22:10:30 +0300
committerSteve French <stfrench@microsoft.com>2025-10-15 15:44:17 +0300
commitb0432201a11b3caaeca6c03f2b3e399275b2e489 (patch)
tree57bd72fdea671353028340d4797bf9825e1f3a83 /drivers/infiniband/hw/ionic/ionic_controlpath.c
parent1ef0e16c3d7ca07432987840d8eef1a9ffb67dec (diff)
downloadlinux-b0432201a11b3caaeca6c03f2b3e399275b2e489.tar.xz
smb: client: let destroy_mr_list() keep smbdirect_mr_io memory if registered
If a smbdirect_mr_io structure if still visible to callers of smbd_register_mr() we can't free the related memory when the connection is disconnected! Otherwise smbd_deregister_mr() will crash. Now we use a mutex and refcounting in order to keep the memory around if the connection is disconnected. It means smbd_deregister_mr() can be called at any later time to free the memory, which is no longer referenced by nor referencing the connection. It also means smbd_destroy() no longer needs to wait for mr_io.used.count to become 0. Fixes: 050b8c374019 ("smbd: Make upper layer decide when to destroy the transport") Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_controlpath.c')
0 files changed, 0 insertions, 0 deletions