Commit 3d0bc44
net/vmw_vsock: improve locking in vsock_connect_timeout()
A possible locking issue in vsock_connect_timeout() was recognized by
Eric Dumazet which might cause a null pointer dereference in
vsock_transport_cancel_pkt(). This patch assures that
vsock_transport_cancel_pkt() will be called within the lock, so a race
condition won't occur which could result in vsk->transport to be set to NULL.
Fixes: 380feae ("vsock: cancel packets when failing to connect")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Norbert Slusarek <nslusarek@gmx.net>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/trinity-f8e0937a-cf0e-4d80-a76e-d9a958ba3ef1-1612535522360@3c-app-gmx-bap12
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5d1cbcc commit 3d0bc44
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | | - | |
1247 | 1246 | | |
1248 | 1247 | | |
1249 | 1248 | | |
| |||
1254 | 1253 | | |
1255 | 1254 | | |
1256 | 1255 | | |
1257 | | - | |
| 1256 | + | |
1258 | 1257 | | |
1259 | 1258 | | |
1260 | | - | |
1261 | | - | |
1262 | 1259 | | |
1263 | 1260 | | |
1264 | 1261 | | |
| |||
0 commit comments