Commit 403149b
smb3: Call cifs reconnect from demultiplex thread
commit de9ac0a upstream.
cifs_reconnect needs to be called only from demultiplex thread.
skip cifs_reconnect in offload thread. So, cifs_reconnect will be
called by demultiplex thread in subsequent request.
These patches address a problem found during decryption offload:
CIFS: VFS: trying to dequeue a deleted mid
that can cause a refcount use after free:
[ 1271.389453] Workqueue: smb3decryptd smb2_decrypt_offload [cifs]
[ 1271.389456] RIP: 0010:refcount_warn_saturate+0xae/0xf0
[ 1271.389457] Code: fa 1d 6a 01 01 e8 c7 44 b1 ff 0f 0b 5d c3 80 3d e7 1d 6a 01 00 75 91 48 c7 c7 d8 be 1d a2 c6 05 d7 1d 6a 01 01 e8 a7 44 b1 ff <0f> 0b 5d c3 80 3d c5 1d 6a 01 00 0f 85 6d ff ff ff 48 c7 c7 30 bf
[ 1271.389458] RSP: 0018:ffffa4cdc1f87e30 EFLAGS: 00010286
[ 1271.389458] RAX: 0000000000000000 RBX: ffff9974d2809f00 RCX: ffff9974df898cc8
[ 1271.389459] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9974df898cc0
[ 1271.389460] RBP: ffffa4cdc1f87e30 R08: 0000000000000004 R09: 00000000000002c0
[ 1271.389460] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9974b7fdb5c0
[ 1271.389461] R13: ffff9974d2809f00 R14: ffff9974ccea0a80 R15: ffff99748e60db80
[ 1271.389462] FS: 0000000000000000(0000) GS:ffff9974df880000(0000) knlGS:0000000000000000
[ 1271.389462] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1271.389463] CR2: 000055c60f344fe4 CR3: 0000001031a3c002 CR4: 00000000003706e0
[ 1271.389465] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1271.389465] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1271.389466] Call Trace:
[ 1271.389483] cifs_mid_q_entry_release+0xce/0x110 [cifs]
[ 1271.389499] smb2_decrypt_offload+0xa9/0x1c0 [cifs]
[ 1271.389501] process_one_work+0x1e8/0x3b0
[ 1271.389503] worker_thread+0x50/0x370
[ 1271.389504] kthread+0x12f/0x150
[ 1271.389506] ? process_one_work+0x3b0/0x3b0
[ 1271.389507] ? __kthread_bind_mask+0x70/0x70
[ 1271.389509] ret_from_fork+0x22/0x30
Signed-off-by: Rohith Surabattula <[email protected]>
Reviewed-by: Pavel Shilovsky <[email protected]>
CC: Stable <[email protected]> #5.4+
Signed-off-by: Steve French <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 3755531 commit 403149b
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4212 | 4212 | | |
4213 | 4213 | | |
4214 | 4214 | | |
4215 | | - | |
| 4215 | + | |
| 4216 | + | |
4216 | 4217 | | |
4217 | 4218 | | |
4218 | 4219 | | |
| |||
4234 | 4235 | | |
4235 | 4236 | | |
4236 | 4237 | | |
4237 | | - | |
| 4238 | + | |
| 4239 | + | |
4238 | 4240 | | |
4239 | 4241 | | |
4240 | 4242 | | |
| |||
4374 | 4376 | | |
4375 | 4377 | | |
4376 | 4378 | | |
4377 | | - | |
| 4379 | + | |
| 4380 | + | |
4378 | 4381 | | |
4379 | 4382 | | |
4380 | 4383 | | |
| |||
4478 | 4481 | | |
4479 | 4482 | | |
4480 | 4483 | | |
4481 | | - | |
| 4484 | + | |
4482 | 4485 | | |
4483 | 4486 | | |
4484 | 4487 | | |
| |||
4621 | 4624 | | |
4622 | 4625 | | |
4623 | 4626 | | |
4624 | | - | |
| 4627 | + | |
4625 | 4628 | | |
4626 | 4629 | | |
4627 | 4630 | | |
| |||
0 commit comments