Patch "cifs: Fix oops due to uncleared server->smbd_conn in reconnect" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cifs-fix-oops-due-to-uncleared-server-smbd_conn-in-r.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 77d73d651718ff284353c818277eecbc5fa4eb2a
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Wed Jan 25 14:02:13 2023 +0000

    cifs: Fix oops due to uncleared server->smbd_conn in reconnect
    
    [ Upstream commit b7ab9161cf5ddc42a288edf9d1a61f3bdffe17c7 ]
    
    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: 8ef130f9ec27 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection")
    Cc: stable@xxxxxxxxxxxxxxx
    Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
    Acked-by: Tom Talpey <tom@xxxxxxxxxx>
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Cc: Long Li <longli@xxxxxxxxxxxxx>
    Cc: Pavel Shilovsky <piastryyy@xxxxxxxxx>
    Cc: Ronnie Sahlberg <lsahlber@xxxxxxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
index c839ff9d4965..591cd5c70432 100644
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -1576,6 +1576,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;
 }
 
 /*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux