summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorYu Peng <pengyu@kylinos.cn>2026-07-08 16:02:32 +0800
committerChristian Brauner <brauner@kernel.org>2026-07-31 10:09:11 +0200
commitc610d2d0787961cdd6fc1de69d9be1ff3687e1a6 (patch)
tree21a84daf1a8483fd525a7d16eff4825911109c73 /init
parentf797d7b64eb46bb16b51cdfdb72f915f31d4c11b (diff)
fs: annotate inode timestamp accessors
syzbot reported a KCSAN race between fill_mg_cmtime() and inode_set_ctime_to_ts() on inode->i_ctime_{sec,nsec}. stat/getattr can sample inode timestamps while update paths store new values concurrently, so KCSAN can report benign races on these fields. Annotate the timestamp accessors with READ_ONCE()/WRITE_ONCE(), and use the ctime accessor for the remaining ctime loads. This avoids the KCSAN reports without changing timestamp semantics. Fixes: 4e40eff0b573 ("fs: add infrastructure for multigrain timestamps") Reported-by: syzbot+8b3bd9f8a06658479d4a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=8b3bd9f8a06658479d4a Signed-off-by: Yu Peng <pengyu@kylinos.cn> Link: https://patch.msgid.link/20260708080232.2564807-1-pengyu@kylinos.cn Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions