Re: [PATCH] shmem: Serialize fallocate progress with writeout

From: Zhu Jun

Date: Wed Nov 11 2026 - 21:44:02 EST


Hi Baolin,

The KCSAN report I referred to is:
https://syzbot.org/bug?extid=aae8bd56cc1c38d50ec4

Full report:
https://syzbot.org/text?tag=CrashReport&x=16888bf5580000

At the reported revision, the conflicting accesses are the store to
shmem_falloc.next in shmem_fallocate() and the load of that field in
shmem_writeout().

I have not demonstrated a user-visible failure beyond the KCSAN warning,
and I have not reproduced this race locally. The VM tests I ran had no
swap, so they do not validate concurrent swap writeout.

I used i_lock to serialize the accesses, but I have not established that
the algorithm requires a consistent snapshot of the progress counters.
The report alone does not justify adding those locks. I will revisit
READ_ONCE()/WRITE_ONCE() for the shared accesses, while retaining the
existing writeout-side locking for i_private and counter updates.

Thanks for the review,
Zhu Jun