aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/page_pool.c
diff options
context:
space:
mode:
authorLongpeng(Mike) <[email protected]>2021-08-12 05:30:56 +0000
committerJakub Kicinski <[email protected]>2021-08-12 17:57:27 +0000
commit49b0b6ffe20c5344f4173f3436298782a08da4f2 (patch)
tree987cce64fc41f2ce4609895a61d95d313ca3a6bd /net/core/page_pool.c
parentwwan: core: Avoid returning NULL from wwan_create_dev() (diff)
downloadkernel-49b0b6ffe20c5344f4173f3436298782a08da4f2.tar.gz
kernel-49b0b6ffe20c5344f4173f3436298782a08da4f2.zip
vsock/virtio: avoid potential deadlock when vsock device remove
There's a potential deadlock case when remove the vsock device or process the RESET event: vsock_for_each_connected_socket: spin_lock_bh(&vsock_table_lock) ----------- (1) ... virtio_vsock_reset_sock: lock_sock(sk) --------------------- (2) ... spin_unlock_bh(&vsock_table_lock) lock_sock() may do initiative schedule when the 'sk' is owned by other thread at the same time, we would receivce a warning message that "scheduling while atomic". Even worse, if the next task (selected by the scheduler) try to release a 'sk', it need to request vsock_table_lock and the deadlock occur, cause the system into softlockup state. Call trace: queued_spin_lock_slowpath vsock_remove_bound vsock_remove_sock virtio_transport_release __vsock_release vsock_release __sock_release sock_close __fput ____fput So we should not require sk_lock in this case, just like the behavior in vhost_vsock or vmci. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Cc: Stefan Hajnoczi <[email protected]> Signed-off-by: Longpeng(Mike) <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
0 files changed, 0 insertions, 0 deletions