Commit a194c985 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

vsock/virtio: use GFP_ATOMIC under RCU read lock

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/hfcr2aget2zojmqpr4uhlzvnep4vgskblx5b6xf2ddosbsrke7@nt34bxgp7j2x


Fixes: efcd71af ("vsock/virtio: avoid queuing packets when intermediate queue is empty")
Reported-by: default avatarChristian Brauner <brauner@kernel.org>
Cc: Stefano Garzarella <sgarzare@redhat.com>
Cc: Luigi Leonardi <luigi.leonardi@outlook.com>
Message-ID: <3fbfb6e871f625f89eb578c7228e127437b1975a.1727876449.git.mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Reviewed-by: default avatarLuigi Leonardi <luigi.leonardi@outlook.com>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
parent b9efbe2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment