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

Pull smb client fixes from Steve French:

- multichannel fixes (including a lock ordering fix and an important
refcounting fix)

- spnego fix

* tag '6.7-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix lock ordering while disabling multichannel
cifs: fix leak of iface for primary channel
cifs: fix check of rc in function generate_smb3signingkey
cifs: spnego: add ';' in HOST_KEY_LEN

+23 -14
+2 -2
fs/smb/client/cifs_spnego.c
··· 64 64 * strlen(";sec=ntlmsspi") */ 65 65 #define MAX_MECH_STR_LEN 13 66 66 67 - /* strlen of "host=" */ 68 - #define HOST_KEY_LEN 5 67 + /* strlen of ";host=" */ 68 + #define HOST_KEY_LEN 6 69 69 70 70 /* strlen of ";ip4=" or ";ip6=" */ 71 71 #define IP_KEY_LEN 5
+6
fs/smb/client/connect.c
··· 2065 2065 ses->chans[i].server = NULL; 2066 2066 } 2067 2067 2068 + /* we now account for primary channel in iface->refcount */ 2069 + if (ses->chans[0].iface) { 2070 + kref_put(&ses->chans[0].iface->refcount, release_iface); 2071 + ses->chans[0].server = NULL; 2072 + } 2073 + 2068 2074 sesInfoFree(ses); 2069 2075 cifs_put_tcp_session(server, 0); 2070 2076 }
+13 -9
fs/smb/client/sess.c
··· 322 322 iface = ses->chans[i].iface; 323 323 server = ses->chans[i].server; 324 324 325 + /* 326 + * remove these references first, since we need to unlock 327 + * the chan_lock here, since iface_lock is a higher lock 328 + */ 329 + ses->chans[i].iface = NULL; 330 + ses->chans[i].server = NULL; 331 + spin_unlock(&ses->chan_lock); 332 + 325 333 if (iface) { 326 334 spin_lock(&ses->iface_lock); 327 335 kref_put(&iface->refcount, release_iface); 328 - ses->chans[i].iface = NULL; 329 336 iface->num_channels--; 330 337 if (iface->weight_fulfilled) 331 338 iface->weight_fulfilled--; 332 339 spin_unlock(&ses->iface_lock); 333 340 } 334 341 335 - spin_unlock(&ses->chan_lock); 336 - if (server && !server->terminate) { 337 - server->terminate = true; 338 - cifs_signal_cifsd_for_reconnect(server, false); 339 - } 340 - spin_lock(&ses->chan_lock); 341 - 342 342 if (server) { 343 - ses->chans[i].server = NULL; 343 + if (!server->terminate) { 344 + server->terminate = true; 345 + cifs_signal_cifsd_for_reconnect(server, false); 346 + } 344 347 cifs_put_tcp_session(server, false); 345 348 } 346 349 350 + spin_lock(&ses->chan_lock); 347 351 } 348 352 349 353 done:
+2 -3
fs/smb/client/smb2transport.c
··· 458 458 ptriplet->encryption.context, 459 459 ses->smb3encryptionkey, 460 460 SMB3_ENC_DEC_KEY_SIZE); 461 + if (rc) 462 + return rc; 461 463 rc = generate_key(ses, ptriplet->decryption.label, 462 464 ptriplet->decryption.context, 463 465 ses->smb3decryptionkey, ··· 467 465 if (rc) 468 466 return rc; 469 467 } 470 - 471 - if (rc) 472 - return rc; 473 468 474 469 #ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS 475 470 cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);