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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '6.1-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:

- two missing and one incorrect return value checks

- fix leak on tlink mount failure

* tag '6.1-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: add check for returning value of SMB2_set_info_init
cifs: Fix wrong return value checking when GETFLAGS
cifs: add check for returning value of SMB2_close_init
cifs: Fix connections leak when tlink setup failed

+17 -5
+11 -3
fs/cifs/connect.c
··· 3855 3855 uuid_copy(&cifs_sb->dfs_mount_id, &mnt_ctx.mount_id); 3856 3856 3857 3857 out: 3858 - free_xid(mnt_ctx.xid); 3859 3858 cifs_try_adding_channels(cifs_sb, mnt_ctx.ses); 3860 - return mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); 3859 + rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); 3860 + if (rc) 3861 + goto error; 3862 + 3863 + free_xid(mnt_ctx.xid); 3864 + return rc; 3861 3865 3862 3866 error: 3863 3867 dfs_cache_put_refsrv_sessions(&mnt_ctx.mount_id); ··· 3888 3884 goto error; 3889 3885 } 3890 3886 3887 + rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); 3888 + if (rc) 3889 + goto error; 3890 + 3891 3891 free_xid(mnt_ctx.xid); 3892 - return mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); 3892 + return rc; 3893 3893 3894 3894 error: 3895 3895 mount_put_conns(&mnt_ctx);
+2 -2
fs/cifs/ioctl.c
··· 343 343 rc = put_user(ExtAttrBits & 344 344 FS_FL_USER_VISIBLE, 345 345 (int __user *)arg); 346 - if (rc != EOPNOTSUPP) 346 + if (rc != -EOPNOTSUPP) 347 347 break; 348 348 } 349 349 #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */ ··· 373 373 * pSMBFile->fid.netfid, 374 374 * extAttrBits, 375 375 * &ExtAttrMask); 376 - * if (rc != EOPNOTSUPP) 376 + * if (rc != -EOPNOTSUPP) 377 377 * break; 378 378 */ 379 379
+4
fs/cifs/smb2ops.c
··· 1116 1116 COMPOUND_FID, current->tgid, 1117 1117 FILE_FULL_EA_INFORMATION, 1118 1118 SMB2_O_INFO_FILE, 0, data, size); 1119 + if (rc) 1120 + goto sea_exit; 1119 1121 smb2_set_next_command(tcon, &rqst[1]); 1120 1122 smb2_set_related(&rqst[1]); 1121 1123 ··· 1128 1126 rqst[2].rq_nvec = 1; 1129 1127 rc = SMB2_close_init(tcon, server, 1130 1128 &rqst[2], COMPOUND_FID, COMPOUND_FID, false); 1129 + if (rc) 1130 + goto sea_exit; 1131 1131 smb2_set_related(&rqst[2]); 1132 1132 1133 1133 rc = compound_send_recv(xid, ses, server,