Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-07 Thread Michael S. Tsirkin
On Mon, Oct 07, 2024 at 08:39:20AM -0700, Jakub Kicinski wrote: > On Wed, 2 Oct 2024 09:41:42 -0400 Michael S. Tsirkin wrote: > > virtio_transport_send_pkt in now called on transport fast path, > > under RCU read lock. In that case, we have a bug: virtio_add_sgs > > is called with GFP_KERNEL, and m

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-07 Thread Jakub Kicinski
On Wed, 2 Oct 2024 09:41:42 -0400 Michael S. Tsirkin wrote: > virtio_transport_send_pkt in now called on transport fast path, > under RCU read lock. In that case, we have a bug: virtio_add_sgs > is called with GFP_KERNEL, and might sleep. > > Pass the gfp flags as an argument, and use GFP_ATOMIC o

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-03 Thread Gupta, Pankaj
virtio_transport_send_pkt in now called on transport fast path, under RCU read lock. In that case, we have a bug: virtio_add_sgs is called with GFP_KERNEL, and might sleep. Pass the gfp flags as an argument, and use GFP_ATOMIC on the fast path. Link: https://lore.kernel.org/all/hfcr2aget2zojmqp

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-03 Thread Christian Brauner
On Wed, Oct 02, 2024 at 09:41:42AM GMT, Michael S. Tsirkin wrote: > virtio_transport_send_pkt in now called on transport fast path, > under RCU read lock. In that case, we have a bug: virtio_add_sgs > is called with GFP_KERNEL, and might sleep. > > Pass the gfp flags as an argument, and use GFP_AT

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-02 Thread Luigi Leonardi
> Link: > https://lore.kernel.org/all/hfcr2aget2zojmqpr4uhlzvnep4vgskblx5b6xf2ddosbsrke7@nt34bxgp7j2x > Fixes: efcd71af38be ("vsock/virtio: avoid queuing packets when intermediate > queue is empty") > Reported-by: Christian Brauner > Cc: Stefano Garzarella > Cc: Luigi Leonardi > Signed-off-by:

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-02 Thread Stefano Garzarella
On Wed, Oct 02, 2024 at 04:02:06PM GMT, Stefano Garzarella wrote: On Wed, Oct 02, 2024 at 09:41:42AM GMT, Michael S. Tsirkin wrote: virtio_transport_send_pkt in now called on transport fast path, under RCU read lock. In that case, we have a bug: virtio_add_sgs is called with GFP_KERNEL, and migh

Re: [PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-02 Thread Stefano Garzarella
On Wed, Oct 02, 2024 at 09:41:42AM GMT, Michael S. Tsirkin wrote: virtio_transport_send_pkt in now called on transport fast path, under RCU read lock. In that case, we have a bug: virtio_add_sgs is called with GFP_KERNEL, and might sleep. Pass the gfp flags as an argument, and use GFP_ATOMIC on

[PATCH] vsock/virtio: use GFP_ATOMIC under RCU read lock

2024-10-02 Thread Michael S. Tsirkin
virtio_transport_send_pkt in now called on transport fast path, under RCU read lock. In that case, we have a bug: virtio_add_sgs is called with GFP_KERNEL, and might sleep. Pass the gfp flags as an argument, and use GFP_ATOMIC on the fast path. Link: https://lore.kernel.org/all/hfcr2aget2zojmqpr