cifs: prevent infinite recursion in CIFSGetDFSRefer()
commit 09ba47b44d upstream.
We can't call smb_init() in CIFSGetDFSRefer() as cifs_reconnect_tcon()
may end up calling CIFSGetDFSRefer() again to get new DFS referrals
and thus causing an infinite recursion.
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: stable@vger.kernel.org # 6.2
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8b3d7ad3e8
commit
63bbe24b99
+7
-2
@@ -4859,8 +4859,13 @@ CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
getDFSRetry:
|
getDFSRetry:
|
||||||
rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, (void **) &pSMB,
|
/*
|
||||||
(void **) &pSMBr);
|
* Use smb_init_no_reconnect() instead of smb_init() as
|
||||||
|
* CIFSGetDFSRefer() may be called from cifs_reconnect_tcon() and thus
|
||||||
|
* causing an infinite recursion.
|
||||||
|
*/
|
||||||
|
rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc,
|
||||||
|
(void **)&pSMB, (void **)&pSMBr);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user