All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] virtio_ring: check desc == NULL when packed and indirect
@ 2021-09-27 10:54 Xuan Zhuo
  2021-09-27 10:54 ` [PATCH v2 1/2] virtio_ring: fix style of virtqueue_add_indirect_packed Xuan Zhuo
  2021-09-27 10:54 ` [PATCH v2 2/2] virtio_ring: check desc == NULL when packed and indirect Xuan Zhuo
  0 siblings, 2 replies; 7+ messages in thread
From: Xuan Zhuo @ 2021-09-27 10:54 UTC (permalink / raw)
  To: virtualization; +Cc: David S. Miller, Tiwei Bie, Michael S. Tsirkin

In the case of packed, use indirect desc, since desc is allocated by
kmalloc_array(), we should check whether its return value is NULL.

This patch alloc desc inside virtqueue_add_packe(), if desc == NULL,
fall back to not using indirect.

v2:
    Separate the style fix into a single patch.

Xuan Zhuo (2):
  virtio_ring: fix style of virtqueue_add_indirect_packed
  virtio_ring: check desc == NULL when packed and indirect

 drivers/virtio/virtio_ring.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

--
2.31.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-19 10:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 10:54 [PATCH v2 0/2] virtio_ring: check desc == NULL when packed and indirect Xuan Zhuo
2021-09-27 10:54 ` [PATCH v2 1/2] virtio_ring: fix style of virtqueue_add_indirect_packed Xuan Zhuo
2021-09-28  3:14   ` Jason Wang
2021-10-19  8:15     ` Xuan Zhuo
2021-10-19 10:38       ` Michael S. Tsirkin
2021-09-27 10:54 ` [PATCH v2 2/2] virtio_ring: check desc == NULL when packed and indirect Xuan Zhuo
2021-09-28  3:20   ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.