aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2023-01-25 14:02:13 +0000
committerSteve French <[email protected]>2023-01-25 09:57:48 -0600
commitb7ab9161cf5ddc42a288edf9d1a61f3bdffe17c7 (patch)
tree82f166001f7f75f38b48318e2ffd54824855efa0
parent2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff)
cifs: Fix oops due to uncleared server->smbd_conn in reconnect
In smbd_destroy(), clear the server->smbd_conn pointer after freeing the smbd_connection struct that it points to so that reconnection doesn't get confused. Fixes: 8ef130f9ec27 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection") Cc: [email protected] Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Acked-by: Tom Talpey <[email protected]> Signed-off-by: David Howells <[email protected]> Cc: Long Li <[email protected]> Cc: Pavel Shilovsky <[email protected]> Cc: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
-rw-r--r--fs/cifs/smbdirect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
index 90789aaa6567..8c816b25ce7c 100644
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -1405,6 +1405,7 @@ void smbd_destroy(struct TCP_Server_Info *server)
destroy_workqueue(info->workqueue);
log_rdma_event(INFO, "rdma session destroyed\n");
kfree(info);
+ server->smbd_conn = NULL;
}
/*