[PATCH v2] virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN

2025-03-12 Thread Zhongqiu Han
upt notification when the event index is used. Fix this KCSAN reported data-race issue by explicitly tagging the access as data_racy. Reported-by: syzbot+efe683d57990864b8...@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67c7761a.050a0220.15b4b9.0018@google.com/ Signed-off-by: Zhong

Re: [PATCH] virtio_ring: Fix data race when accessing the event_triggered field of vring_virtqueue

2025-03-12 Thread Zhongqiu Han
On 3/12/2025 9:11 AM, Jason Wang wrote: On Tue, Mar 11, 2025 at 9:18 PM Zhongqiu Han wrote: Syzkaller reports a data-race when accessing the event_triggered field of vring_virtqueue in virtqueue_disable_cb / virtqueue_enable_cb_delayed. Here is the simplified stack when the issue occurred

[PATCH] virtio_ring: Fix data race when accessing the event_triggered field of vring_virtqueue

2025-03-11 Thread Zhongqiu Han
n func virtqueue_disable_cb(), so event_triggered should also be protected in it. Reported-by: syzbot+efe683d57990864b8...@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/67c7761a.050a0220.15b4b9.0018@google.com/ Signed-off-by: Zhongqiu Han --- drivers/virtio/virtio_ring.