Patch "cifs: Fix lost destroy smbd connection when MR allocate failed" has been added to the 5.4-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 lost destroy smbd connection when MR allocate failed

to the 5.4-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-lost-destroy-smbd-connection-when-mr-alloca.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 8d04ba853f714a71d55db593770f7b7a5afd5975
Author: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx>
Date:   Fri Nov 18 16:42:07 2022 +0800

    cifs: Fix lost destroy smbd connection when MR allocate failed
    
    [ Upstream commit e9d3401d95d62a9531082cd2453ed42f2740e3fd ]
    
    If the MR allocate failed, the smb direct connection info is NULL,
    then smbd_destroy() will directly return, then the connection info
    will be leaked.
    
    Let's set the smb direct connection info to the server before call
    smbd_destroy().
    
    Fixes: c7398583340a ("CIFS: SMBD: Implement RDMA memory registration")
    Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx>
    Acked-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
    Reviewed-by: David Howells <dhowells@xxxxxxxxxx>
    Reviewed-by: Tom Talpey <tom@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 2cea6c25d1b0e..66265e7303cd4 100644
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -1784,6 +1784,7 @@ static struct smbd_connection *_smbd_get_connection(
 
 allocate_mr_failed:
 	/* At this point, need to a full transport shutdown */
+	server->smbd_conn = info;
 	smbd_destroy(server);
 	return 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