Skip to content

Commit

Permalink
vsock/loopback: don't disable irqs for queue access
Browse files Browse the repository at this point in the history
This replaces 'skb_queue_tail()' with 'virtio_vsock_skb_queue_tail()'.
The first one uses 'spin_lock_irqsave()', second uses 'spin_lock_bh()'.
There is no need to disable interrupts in the loopback transport as
there is no access to the queue with skbs from interrupt context. Both
virtio and vhost transports work in the same way.

Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arseniy Krasnov authored and David S. Miller committed Apr 14, 2023
1 parent c61fcc0 commit eaaa4e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/vmw_vsock/vsock_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ static int vsock_loopback_send_pkt(struct sk_buff *skb)
struct vsock_loopback *vsock = &the_vsock_loopback;
int len = skb->len;

skb_queue_tail(&vsock->pkt_queue, skb);

virtio_vsock_skb_queue_tail(&vsock->pkt_queue, skb);
queue_work(vsock->workqueue, &vsock->pkt_work);

return len;
Expand Down

0 comments on commit eaaa4e9

Please sign in to comment.