提交 811530db 编写于 作者: D David Howells 提交者: sanglipeng

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

stable inclusion
from stable-v5.10.166
commit e037baee16e0b9ace7e730888fcae9cec11daff2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7TH9O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e037baee16e0b9ace7e730888fcae9cec11daff2

--------------------------------

commit b7ab9161 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: NPaulo Alcantara (SUSE) <pc@cjr.nz>
Acked-by: NTom Talpey <tom@talpey.com>
Signed-off-by: NDavid 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: NSteve French <stfrench@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 a31fd376
...@@ -1394,6 +1394,7 @@ void smbd_destroy(struct TCP_Server_Info *server) ...@@ -1394,6 +1394,7 @@ void smbd_destroy(struct TCP_Server_Info *server)
destroy_workqueue(info->workqueue); destroy_workqueue(info->workqueue);
log_rdma_event(INFO, "rdma session destroyed\n"); log_rdma_event(INFO, "rdma session destroyed\n");
kfree(info); kfree(info);
server->smbd_conn = NULL;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册