Commit 665bcfc
Paolo Abeni
Merge branch 'vsock-some-fixes-due-to-transport-de-assignment'
Stefano Garzarella says:
====================
vsock: some fixes due to transport de-assignment
v1: https://lore.kernel.org/netdev/[email protected]/
v2:
- Added patch 3 to cancel the virtio close delayed work when de-assigning
the transport
- Added patch 4 to clean the socket state after de-assigning the transport
- Added patch 5 as suggested by Michael and Hyunwoo Kim. It's based on
Hyunwoo Kim and Wongi Lee patch [1] but using WARN_ON and covering more
functions
- Added R-b/T-b tags
This series includes two patches discussed in the thread started by
Hyunwoo Kim a few weeks ago [1], plus 3 more patches added after some
discussions on v1 (see changelog). All related to the case where a vsock
socket is de-assigned from a transport (e.g., because the connect fails
or is interrupted by a signal) and then assigned to another transport
or to no-one (NULL).
I tested with usual vsock test suite, plus Michal repro [2]. (Note: the repo
works only if a G2H transport is not loaded, e.g. virtio-vsock driver).
The first patch is a fix more appropriate to the problem reported in
that thread, the second patch on the other hand is a related fix but
of a different problem highlighted by Michal Luczaj. It's present only
in vsock_bpf and already handled in af_vsock.c
The third patch is to cancel the virtio close delayed work when de-assigning
the transport, the fourth patch is to clean the socket state after de-assigning
the transport, the last patch adds warnings and prevents null-ptr-deref in
vsock_*[has_data|has_space].
Hyunwoo Kim, Michal, if you can test and report your Tested-by that
would be great!
[1] https://lore.kernel.org/netdev/Z2K%2FI4nlHdfMRTZC@v4bel-B760M-AORUS-ELITE-AX/
[2] https://lore.kernel.org/netdev/[email protected]/
====================
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>File tree
3 files changed
+53
-10
lines changed- net/vmw_vsock
3 files changed
+53
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
494 | 503 | | |
495 | 504 | | |
496 | 505 | | |
| |||
870 | 879 | | |
871 | 880 | | |
872 | 881 | | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
873 | 885 | | |
874 | 886 | | |
875 | 887 | | |
| |||
878 | 890 | | |
879 | 891 | | |
880 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
881 | 896 | | |
882 | 897 | | |
883 | 898 | | |
| |||
887 | 902 | | |
888 | 903 | | |
889 | 904 | | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
890 | 908 | | |
891 | 909 | | |
892 | 910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
1109 | 1112 | | |
1110 | 1113 | | |
1111 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
1112 | 1117 | | |
1113 | 1118 | | |
1114 | 1119 | | |
| |||
1204 | 1209 | | |
1205 | 1210 | | |
1206 | 1211 | | |
1207 | | - | |
1208 | | - | |
| 1212 | + | |
| 1213 | + | |
1209 | 1214 | | |
1210 | 1215 | | |
1211 | 1216 | | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | 1217 | | |
1219 | 1218 | | |
1220 | 1219 | | |
| |||
1226 | 1225 | | |
1227 | 1226 | | |
1228 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
1229 | 1242 | | |
1230 | 1243 | | |
1231 | 1244 | | |
| |||
1628 | 1641 | | |
1629 | 1642 | | |
1630 | 1643 | | |
1631 | | - | |
1632 | | - | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
1633 | 1649 | | |
1634 | 1650 | | |
1635 | 1651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| 119 | + | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| |||
0 commit comments