ksmbd: smbd: fix kernel oops during server shutdown
if server shutdown happens in the situation that there are connections, workqueue could be destroyed before queueing disconnect work. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
777cad1604
commit
323b1ea102
|
@ -329,6 +329,7 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
|
|||
static void
|
||||
smb_direct_disconnect_rdma_connection(struct smb_direct_transport *t)
|
||||
{
|
||||
if (t->status == SMB_DIRECT_CS_CONNECTED)
|
||||
queue_work(smb_direct_wq, &t->disconnect_work);
|
||||
}
|
||||
|
||||
|
@ -1415,7 +1416,7 @@ static void smb_direct_disconnect(struct ksmbd_transport *t)
|
|||
|
||||
ksmbd_debug(RDMA, "Disconnecting cm_id=%p\n", st->cm_id);
|
||||
|
||||
smb_direct_disconnect_rdma_connection(st);
|
||||
smb_direct_disconnect_rdma_work(&st->disconnect_work);
|
||||
wait_event_interruptible(st->wait_status,
|
||||
st->status == SMB_DIRECT_CS_DISCONNECTED);
|
||||
free_transport(st);
|
||||
|
|
Loading…
Reference in New Issue