Commit bacb6c1
net/smc: Don't call clcsock shutdown twice when smc shutdown
When applications call shutdown() with SHUT_RDWR in userspace,
smc_close_active() calls kernel_sock_shutdown(), and it is called
twice in smc_shutdown().
This fixes this by checking sk_state before do clcsock shutdown, and
avoids missing the application's call of smc_shutdown().
Link: https://lore.kernel.org/linux-s390/1f67548e-cbf6-0dce-82b5-10288a4583bd@linux.ibm.com/
Fixes: 606a63c ("net/smc: Ensure the active closing peer first closes clcsock")
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20211126024134.45693-1-tonylu@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 01d9cc2 commit bacb6c1
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2370 | 2370 | | |
2371 | 2371 | | |
2372 | 2372 | | |
| 2373 | + | |
2373 | 2374 | | |
2374 | 2375 | | |
| 2376 | + | |
2375 | 2377 | | |
2376 | 2378 | | |
2377 | 2379 | | |
| |||
2398 | 2400 | | |
2399 | 2401 | | |
2400 | 2402 | | |
| 2403 | + | |
2401 | 2404 | | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
2402 | 2408 | | |
2403 | 2409 | | |
2404 | 2410 | | |
| |||
2408 | 2414 | | |
2409 | 2415 | | |
2410 | 2416 | | |
2411 | | - | |
| 2417 | + | |
2412 | 2418 | | |
2413 | 2419 | | |
2414 | 2420 | | |
| |||
0 commit comments