Commit 57fc0f1
mptcp: ensure listener is unhashed before updating the sk status
The MPTCP protocol access the listener subflow in a lockless
manner in a couple of places (poll, diag). That works only if
the msk itself leaves the listener status only after that the
subflow itself has been closed/disconnected. Otherwise we risk
deadlock in diag, as reported by Christoph.
Address the issue ensuring that the first subflow (the listener
one) is always disconnected before updating the msk socket status.
Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: multipath-tcp/mptcp_net-next#407
Fixes: b29fcfb ("mptcp: full disconnect implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent b7535cf commit 57fc0f1
2 files changed
Lines changed: 20 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1047 | 1047 | | |
1048 | 1048 | | |
1049 | 1049 | | |
| 1050 | + | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | 1053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2368 | 2368 | | |
2369 | 2369 | | |
2370 | 2370 | | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
2378 | 2371 | | |
2379 | 2372 | | |
2380 | 2373 | | |
| |||
2902 | 2895 | | |
2903 | 2896 | | |
2904 | 2897 | | |
2905 | | - | |
| 2898 | + | |
2906 | 2899 | | |
2907 | | - | |
2908 | | - | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
2909 | 2916 | | |
2910 | 2917 | | |
2911 | 2918 | | |
| |||
2918 | 2925 | | |
2919 | 2926 | | |
2920 | 2927 | | |
2921 | | - | |
| 2928 | + | |
2922 | 2929 | | |
2923 | 2930 | | |
2924 | 2931 | | |
| |||
3035 | 3042 | | |
3036 | 3043 | | |
3037 | 3044 | | |
3038 | | - | |
| 3045 | + | |
3039 | 3046 | | |
3040 | 3047 | | |
3041 | 3048 | | |
| |||
0 commit comments