OSDN Git Service

virtio_ring: check desc == NULL when using indirect with packed
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Wed, 20 Oct 2021 11:23:23 +0000 (19:23 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 09:26:47 +0000 (05:26 -0400)
commitfc6d70f40b3d0b3219e2026d05be0409695f620d
tree3fb359046740ee13ddfc75f39b563b1590b119d1
parent8d7670f3734eed45bb9d00d8fd1201f662bc667f
virtio_ring: check desc == NULL when using indirect with packed

When using indirect with packed, we don't check for allocation failures.
This patch checks that and fall back on direct.

Fixes: 1ce9e6055fa0 ("virtio_ring: introduce packed ring support")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20211020112323.67466-3-xuanzhuo@linux.alibaba.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_ring.c