提交 09ba47b4 编写于 作者: P Paulo Alcantara 提交者: Steve French

cifs: prevent infinite recursion in CIFSGetDFSRefer()

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: NPaulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
Cc: stable@vger.kernel.org # 6.2
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 6cc041e9
...@@ -4382,8 +4382,13 @@ CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, ...@@ -4382,8 +4382,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册