Re: [PATCH v3] printk: ringbuffer: Annotate speculative record reads
From: Petr Mladek
Date: Fri Nov 20 2026 - 08:09:52 EST
On Fri 2026-11-13 15:50:38, Zhu Jun wrote:
> Readers may copy a finalized record while a writer recycles its storage.
> prb_read() checks the descriptor again after copying and rejects records
> that have changed, but the plain metadata and text accesses still trigger
> KCSAN reports.
>
> Annotate the speculative copies, line counting and length read with
> data_race(). The descriptor validation continues to determine whether
> the copied record can be used.
>
> Fixes: b6cf8b3f3312 ("printk: add lockless ringbuffer")
> Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
JFYI, the patch has been committed into printk/linux.git,
branch for-7.5-trivial.
Best Regards,
Petr