Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91be5484 authored by David Howells's avatar David Howells Committed by Greg Kroah-Hartman
Browse files

cifs: Fix oops due to uncleared server->smbd_conn in reconnect



commit b7ab9161cf5ddc42a288edf9d1a61f3bdffe17c7 upstream.

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: 8ef130f9 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection")
Cc: stable@vger.kernel.org
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Acked-by: default avatarTom Talpey <tom@talpey.com>
Signed-off-by: default avatarDavid 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: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcb65ada
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1478,6 +1478,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;
}

/*