Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: add check for returning value of SMB2_close_init

If the returning value of SMB2_close_init is an error-value,
exit the function.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 352d96f3acc6 ("cifs: multichannel: move channel selection above transport layer")

Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Anastasia Belova and committed by
Steve French
d520de6c 1dcdf5f5

+2
+2
fs/cifs/smb2ops.c
··· 1126 1126 rqst[2].rq_nvec = 1; 1127 1127 rc = SMB2_close_init(tcon, server, 1128 1128 &rqst[2], COMPOUND_FID, COMPOUND_FID, false); 1129 + if (rc) 1130 + goto sea_exit; 1129 1131 smb2_set_related(&rqst[2]); 1130 1132 1131 1133 rc = compound_send_recv(xid, ses, server,