> From: YanXin Li <[email protected]> > > vhost_add_used_n_in_order() plays the batch of used-ring writes back a > second time for dirty logging. Commit e244725e86be ("vhost: fix used > ring index wrap in vhost_add_used_n_in_order") masked the index in the > descriptor-publishing loop. The dirty-logging loop introduced by > bfcde6b64769 still uses the single-subtraction form > > next = start + nheads[i]; > if (next >= vq->num) > next -= vq->num; > > If the guest refills the available ring while get_rx_bufs() collects > one mergeable-RX packet, that packet can consume more heads than > vq->num. get_rx_bufs() permits up to UIO_MAXIOV = 1024 descriptor > [ ... ] > UBSAN, lockdep, and DEBUG_OBJECTS. > > Fixes: bfcde6b64769 ("vhost: fix dirty logging for in-order used ring > entries") > Cc: [email protected] > Signed-off-by: YanXin Li <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20261122-b4-06-vhost-in-order-log-oob-v1-35efdba8fbab-v1-1-fc1253d60...@pm.me?part=1
