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 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- fix refcount leak (can cause rmmod fail)

- fix byte range locking problem with cached reads

- fix for mount failure if reparse point unrecognized

- minor typo

* tag 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb/client: fix typo: GlobalMid_Sem -> GlobalMid_Lock
smb: client: ignore unhandled reparse tags
smb3: fix problem unloading module due to leaked refcount on shutdown
smb3: fix broken cached reads when posix locks

+20 -13
+3 -3
fs/smb/client/cifsfs.c
··· 75 75 /* 76 76 * Global transaction id (XID) information 77 77 */ 78 - unsigned int GlobalCurrentXid; /* protected by GlobalMid_Sem */ 79 - unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Sem */ 80 - unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Sem */ 78 + unsigned int GlobalCurrentXid; /* protected by GlobalMid_Lock */ 79 + unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Lock */ 80 + unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Lock */ 81 81 spinlock_t GlobalMid_Lock; /* protects above & list operations on midQ entries */ 82 82 83 83 /*
+3 -3
fs/smb/client/cifsglob.h
··· 2017 2017 /* 2018 2018 * Global transaction id (XID) information 2019 2019 */ 2020 - extern unsigned int GlobalCurrentXid; /* protected by GlobalMid_Sem */ 2021 - extern unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Sem */ 2022 - extern unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Sem */ 2020 + extern unsigned int GlobalCurrentXid; /* protected by GlobalMid_Lock */ 2021 + extern unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Lock */ 2022 + extern unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Lock */ 2023 2023 extern spinlock_t GlobalMid_Lock; /* protects above & list operations on midQ entries */ 2024 2024 2025 2025 /*
+3
fs/smb/client/connect.c
··· 4194 4194 * 4195 4195 * If one doesn't exist then insert a new tcon_link struct into the tree and 4196 4196 * try to construct a new one. 4197 + * 4198 + * REMEMBER to call cifs_put_tlink() after successful calls to cifs_sb_tlink, 4199 + * to avoid refcount issues 4197 4200 */ 4198 4201 struct tcon_link * 4199 4202 cifs_sb_tlink(struct cifs_sb_info *cifs_sb)
+1 -3
fs/smb/client/file.c
··· 2912 2912 if (!CIFS_CACHE_READ(cinode)) 2913 2913 return netfs_unbuffered_read_iter(iocb, to); 2914 2914 2915 - if (cap_unix(tcon->ses) && 2916 - (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && 2917 - ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0)) { 2915 + if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) { 2918 2916 if (iocb->ki_flags & IOCB_DIRECT) 2919 2917 return netfs_unbuffered_read_iter(iocb, to); 2920 2918 return netfs_buffered_read_iter(iocb, to);
+2
fs/smb/client/ioctl.c
··· 229 229 230 230 shutdown_good: 231 231 trace_smb3_shutdown_done(flags, tcon->tid); 232 + cifs_put_tlink(tlink); 232 233 return 0; 233 234 shutdown_out_err: 234 235 trace_smb3_shutdown_err(rc, flags, tcon->tid); 236 + cifs_put_tlink(tlink); 235 237 return rc; 236 238 } 237 239
+1
fs/smb/client/link.c
··· 588 588 tlink = cifs_sb_tlink(cifs_sb); 589 589 if (IS_ERR(tlink)) { 590 590 rc = PTR_ERR(tlink); 591 + /* BB could be clearer if skipped put_tlink on error here, but harmless */ 591 592 goto symlink_exit; 592 593 } 593 594 pTcon = tlink_tcon(tlink);
+7 -4
fs/smb/client/reparse.c
··· 378 378 u32 plen, struct cifs_sb_info *cifs_sb, 379 379 bool unicode, struct cifs_open_info_data *data) 380 380 { 381 + struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); 382 + 381 383 data->reparse.buf = buf; 382 384 383 385 /* See MS-FSCC 2.1.2 */ ··· 396 394 case IO_REPARSE_TAG_LX_FIFO: 397 395 case IO_REPARSE_TAG_LX_CHR: 398 396 case IO_REPARSE_TAG_LX_BLK: 399 - return 0; 397 + break; 400 398 default: 401 - cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n", 402 - __func__, le32_to_cpu(buf->ReparseTag)); 403 - return -EOPNOTSUPP; 399 + cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n", 400 + le32_to_cpu(buf->ReparseTag)); 401 + break; 404 402 } 403 + return 0; 405 404 } 406 405 407 406 int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,