summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorFang Xieyan <fangxy@xiaopeng.com>2026-09-22 20:29:55 +0800
committerMichael S. Tsirkin <mst@redhat.com>2026-11-02 09:07:01 -0500
commit8689ee3842daf24cd886b75cc8bd3c55e7d02199 (patch)
tree6f1a9d438daa9e61ca8de5ee1bcd508092118e02 /include/linux/timerqueue.h
parentf898439ace7f89922e853b43bcbfcd26ea2e0a98 (diff)
vringh: add regression test for cyclic indirect descriptor
Add a case to tools/virtio/vringh_test.c that builds a top-level indirect descriptor whose NEXT points back at itself and checks that vringh_getdesc_user() rejects it with -ELOOP. Without the preceding fix, the walk re-enters the same top-level descriptor without making forward progress: count stays flat, so the traversal limit is never reached and -ELOOP is never returned. With the fix, the top-level count advances on each re-entry and vringh_getdesc_user() returns -ELOOP once the traversal limit is reached. Use index 1 rather than 0 for the self-cycle, since returning from an indirect table is only performed for a positive up_next value. A self-cycle at index 0 would instead terminate the walk and would not reproduce the bug. Assisted-by: Hawkeye:GLM-5.3-flash Assisted-by: Qoder:Qwen3.8-Max Signed-off-by: Fang Xieyan <fangxy@xiaopeng.com> Acked-by: Jason Wang <jasowangio@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260922122955.69433-3-fangxy@xiaopeng.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions