Skip to content

Commit b7ab916

Browse files
dhowellssmfrench
authored andcommitted
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: 8ef130f ("CIFS: SMBD: Implement function to destroy a SMB Direct connection") Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Acked-by: Tom Talpey <tom@talpey.com> Signed-off-by: David Howells <dhowells@redhat.com> Cc: Long Li <longli@microsoft.com> Cc: Pavel Shilovsky <piastryyy@gmail.com> Cc: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 2241ab5 commit b7ab916

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/cifs/smbdirect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,7 @@ void smbd_destroy(struct TCP_Server_Info *server)
14051405
destroy_workqueue(info->workqueue);
14061406
log_rdma_event(INFO, "rdma session destroyed\n");
14071407
kfree(info);
1408+
server->smbd_conn = NULL;
14081409
}
14091410

14101411
/*

0 commit comments

Comments
 (0)