Re: [PATCH 12/14] cifs: handle when server stops supporting multichannel

Paulo Alcantara
2023-11-08T19:13:21Z

Also found memory leaks

...
unreferenced object 0xffff88801c8ca600 (size 192):
comm "python3", pid 14002, jiffies 4300343883 (age 4393.481s)
hex dump (first 32 bytes):
f0 a2 8b 17 80 88 ff ff f0 a2 8b 17 80 88 ff ff ................
01 00 00 00 00 00 00 00 00 ca 9a 3b 00 00 00 00 ...........;....
backtrace:
[<ffffffff8144e3f5>] __kmem_cache_alloc_node+0x295/0x2d0
[<ffffffff813ab1aa>] kmalloc_trace+0x2a/0xc0
[<ffffffffc016178d>] parse_server_interfaces+0x4ed/0xcc0 [cifs]
[<ffffffffc016ae13>] SMB3_request_interfaces+0x163/0x2b0 [cifs]
[<ffffffffc016b0dd>] smb3_qfs_tcon+0x16d/0x2c0 [cifs]
[<ffffffffc01102c1>] cifs_mount_get_tcon+0x3b1/0x550 [cifs]
[<ffffffffc01a2471>] dfs_mount_share+0xcc1/0xfa0 [cifs]
[<ffffffffc011089a>] cifs_mount+0xda/0x4c0 [cifs]
[<ffffffffc01006d5>] cifs_smb3_do_mount+0x1e5/0xcc0 [cifs]
[<ffffffffc01954cd>] smb3_get_tree+0x16d/0x380 [cifs]
[<ffffffff8147c1ad>] vfs_get_tree+0x4d/0x190
[<ffffffff814bdbc3>] fc_mount+0x13/0x60
[<ffffffffc019aae4>] cifs_do_automount.isra.0+0x3c4/0x4d0 [cifs]
[<ffffffffc019ae3d>] cifs_d_automount+0x4d/0x1b0 [cifs]
[<ffffffff8148b01c>] __traverse_mounts+0xcc/0x300
[<ffffffff8149350b>] step_into+0x54b/0xd30

and leaked server connections

Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.46
Features: DFS,FSCACHE,STATS2,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL,WITNESS
CIFSMaxBufSize: 16384
Active VFS Requests: 0

Servers:
1) ConnectionId: 0x70e Hostname: w22-root2.gandalf.test
ClientGUID: 44DAE383-3E91-3042-85FE-87D6F17298B7
Number of credits: 1,1,1 Dialect 0x210
Server capabilities: 0x300007
TCP status: 4 Instance: 77
Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0 Net namespace: 4026531840
In Send: 0 In MaxReq Wait: 0
DFS leaf full path: \\W22-ROOT1.GANDALF.TEST\dfstest3\link10

Sessions:
[NONE]
2) ConnectionId: 0x706 Hostname: w22-root2.gandalf.test
ClientGUID: C8CF45E4-F70D-DF40-8821-0234A2E20DD4
Number of credits: 1,1,1 Dialect 0x210
Server capabilities: 0x300007
TCP status: 4 Instance: 81
Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0 Net namespace: 4026531840
In Send: 0 In MaxReq Wait: 0
DFS leaf full path: \\W22-ROOT1.GANDALF.TEST\dfstest3\link6

Sessions:
[NONE]
3) ConnectionId: 0x6ae Hostname: w22-root1.gandalf.test
ClientGUID: AB059CDD-12FF-B94D-B30C-9E1928ACBA95
Number of credits: 1,1,1 Dialect 0x210
Server capabilities: 0x300007
TCP status: 4 Instance: 96
Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0 Net namespace: 4026531840
In Send: 0 In MaxReq Wait: 0
DFS leaf full path: \\W22-ROOT1.GANDALF.TEST\dfstest3\link9

Sessions:
[NONE]
...

while running reconnect tests.