diff options
author | Anastasia Belova <abelova@astralinux.ru> | 2022-11-15 17:27:01 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-11-15 21:57:54 +0300 |
commit | d520de6cb42e88a1d008b54f935caf9fc05951da (patch) | |
tree | a40b02b7cecea9d072f5be7ddb1c44142fae6d47 /fs/cifs/smb2ops.c | |
parent | 1dcdf5f5b2137185cbdd5385f29949ab3da4f00c (diff) | |
download | linux-d520de6cb42e88a1d008b54f935caf9fc05951da.tar.xz |
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>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 880cd494afea..9737296c0fbc 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -1126,6 +1126,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, rqst[2].rq_nvec = 1; rc = SMB2_close_init(tcon, server, &rqst[2], COMPOUND_FID, COMPOUND_FID, false); + if (rc) + goto sea_exit; smb2_set_related(&rqst[2]); rc = compound_send_recv(xid, ses, server, |