]> git.baikalelectronics.ru Git - uboot.git/commit
virtio_ring: Check used descriptors are chain heads
authorAndrew Scull <ascull@google.com>
Mon, 16 May 2022 10:41:32 +0000 (10:41 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jun 2022 13:24:03 +0000 (09:24 -0400)
commit8d153a3a4b4ddb0aa2856f52d641df38f54c7b9f
treea1dc19e6ec49ade2bc1b5a8b592448d037e0b71a
parentbc14c289d97db9a182708158f199f53136276b7f
virtio_ring: Check used descriptors are chain heads

When the device returns used buffers, it should refer to the descriptor
that is the head of the descriptor chain for that buffer. Confirm this
to be the case by tracking the head of descriptor chains that have been
made available to the device.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/virtio/virtio_ring.c
include/virtio_ring.h