Skip to content

Commit 890d335

Browse files
vwaxmstsirkin
authored andcommitted
virtio-ring: fix DMA metadata flags
The flags are currently overwritten, leading to the wrong direction being passed to the DMA unmap functions. Fixes: 72b5e89 ("virtio-ring: store DMA metadata in desc_extra for split virtqueue") Signed-off-by: Vincent Whitchurch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]>
1 parent 0943aac commit 890d335

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/virtio/virtio_ring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
576576
/* Last one doesn't continue. */
577577
desc[prev].flags &= cpu_to_virtio16(_vq->vdev, ~VRING_DESC_F_NEXT);
578578
if (!indirect && vq->use_dma_api)
579-
vq->split.desc_extra[prev & (vq->split.vring.num - 1)].flags =
579+
vq->split.desc_extra[prev & (vq->split.vring.num - 1)].flags &=
580580
~VRING_DESC_F_NEXT;
581581

582582
if (indirect) {

0 commit comments

Comments
 (0)