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.15-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- Fix dentry leak which can cause umount crash

- Add warning for parse contexts error on compounded operation

* tag '6.15-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb: client: Avoid race in open_cached_dir with lease breaks
smb3 client: warn when parse contexts returns error on compounded operation

+4 -8
+2 -8
fs/smb/client/cached_dir.c
··· 29 29 { 30 30 struct cached_fid *cfid; 31 31 32 - spin_lock(&cfids->cfid_list_lock); 33 32 list_for_each_entry(cfid, &cfids->entries, entry) { 34 33 if (!strcmp(cfid->path, path)) { 35 34 /* ··· 37 38 * being deleted due to a lease break. 38 39 */ 39 40 if (!cfid->time || !cfid->has_lease) { 40 - spin_unlock(&cfids->cfid_list_lock); 41 41 return NULL; 42 42 } 43 43 kref_get(&cfid->refcount); 44 - spin_unlock(&cfids->cfid_list_lock); 45 44 return cfid; 46 45 } 47 46 } 48 47 if (lookup_only) { 49 - spin_unlock(&cfids->cfid_list_lock); 50 48 return NULL; 51 49 } 52 50 if (cfids->num_entries >= max_cached_dirs) { 53 - spin_unlock(&cfids->cfid_list_lock); 54 51 return NULL; 55 52 } 56 53 cfid = init_cached_dir(path); 57 54 if (cfid == NULL) { 58 - spin_unlock(&cfids->cfid_list_lock); 59 55 return NULL; 60 56 } 61 57 cfid->cfids = cfids; ··· 68 74 */ 69 75 cfid->has_lease = true; 70 76 71 - spin_unlock(&cfids->cfid_list_lock); 72 77 return cfid; 73 78 } 74 79 ··· 180 187 if (!utf16_path) 181 188 return -ENOMEM; 182 189 190 + spin_lock(&cfids->cfid_list_lock); 183 191 cfid = find_or_create_cached_dir(cfids, path, lookup_only, tcon->max_cached_dirs); 184 192 if (cfid == NULL) { 193 + spin_unlock(&cfids->cfid_list_lock); 185 194 kfree(utf16_path); 186 195 return -ENOENT; 187 196 } ··· 192 197 * Otherwise, it is either a new entry or laundromat worker removed it 193 198 * from @cfids->entries. Caller will put last reference if the latter. 194 199 */ 195 - spin_lock(&cfids->cfid_list_lock); 196 200 if (cfid->has_lease && cfid->time) { 197 201 spin_unlock(&cfids->cfid_list_lock); 198 202 *ret_cfid = cfid;
+2
fs/smb/client/smb2inode.c
··· 666 666 /* smb2_parse_contexts() fills idata->fi.IndexNumber */ 667 667 rc = smb2_parse_contexts(server, &rsp_iov[0], &oparms->fid->epoch, 668 668 oparms->fid->lease_key, &oplock, &idata->fi, NULL); 669 + if (rc) 670 + cifs_dbg(VFS, "rc: %d parsing context of compound op\n", rc); 669 671 } 670 672 671 673 for (i = 0; i < num_cmds; i++) {