Patch "cifs: use tcon allocation functions even for dummy tcon" has been added to the 6.1-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: use tcon allocation functions even for dummy tcon

to the 6.1-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-use-tcon-allocation-functions-even-for-dummy-tc.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 759ed92e886b727ed92b0a294b1214d9a218542d
Author: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
Date:   Fri Feb 10 16:34:31 2023 +0000

    cifs: use tcon allocation functions even for dummy tcon
    
    [ Upstream commit df57109bd50b9ed6911f3c2aa914189fe4c1fe2c ]
    
    In smb2_reconnect_server, we allocate a dummy tcon for
    calling reconnect for just the session. This should be
    allocated using tconInfoAlloc, and not kmalloc.
    
    Fixes: 3663c9045f51 ("cifs: check reconnects for channels of active tcons too")
    Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
    Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 2c9ffa921e6f6..3b93680a319e4 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3898,7 +3898,7 @@ void smb2_reconnect_server(struct work_struct *work)
 		goto done;
 
 	/* allocate a dummy tcon struct used for reconnect */
-	tcon = kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL);
+	tcon = tconInfoAlloc();
 	if (!tcon) {
 		resched = true;
 		list_for_each_entry_safe(ses, ses2, &tmp_ses_list, rlist) {
@@ -3921,7 +3921,7 @@ void smb2_reconnect_server(struct work_struct *work)
 		list_del_init(&ses->rlist);
 		cifs_put_smb_ses(ses);
 	}
-	kfree(tcon);
+	tconInfoFree(tcon);
 
 done:
 	cifs_dbg(FYI, "Reconnecting tcons and channels finished\n");



[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