]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix oops due to uncleared server->smbd_conn in reconnect
authorDavid Howells <dhowells@redhat.com>
Wed, 25 Jan 2023 14:02:13 +0000 (14:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:37 +0000 (08:34 +0100)
commitb683183d179eeb2a4d87b90318e688b4a24eb946
tree3664b676490f2ea9f88214ffc491a70520f2e130
parent087c67ba822ed4b77c9a2ff3391af373836fdc5b
cifs: Fix oops due to uncleared server->smbd_conn in reconnect

commit 4c718208635dcebc70d7e8c66519029b3eb064ab 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: 97947ba82502 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smbdirect.c