]> 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>
Mon, 6 Feb 2023 06:52:44 +0000 (07:52 +0100)
commitb4487c6c1b00c33b682e9c2c77ea5cb8fb8958df
tree1264670fd6d6e3f71ac04633e2fd840cccbce1b9
parent310223e47620dd950221ee2306018dc519e79db9
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: 2cb924bb40fd ("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