On 11/10/25 10:25 PM, Nilay Shroff wrote:
I applied your patch on my linux tree and ran some tests. And as I earlier suspected, I found the following race from KCSAN:
[ ... ]
Thank you for having run these tests. It's unfortunate that I couldn't trigger these KCSAN complaints in my tests with KCSAN enabled in the kernel configuration.
So from the above trace it seems obvious that we need to mark both writers and readers to avoid potential race.
That would be an intrusive change. I don't think that the kernel maintainers would agree with marking all rq_timeout and all ra_pages reads with READ_ONCE(). I propose to annotate both the rq_timeout and ra_pages data members with __data_racy to suppress these KCSAN reports.
Thanks,
Bart.