From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Matthias Goergens <matthias.goergens@gmail.com>
Cc: linux-kernel@vger.kernel.org,
syzbot+018e6f695ad9bccb182a@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] fat: serialize primary and mirror updates
Date: Mon, 02 Nov 2026 18:33:18 +0900 [thread overview]
Message-ID: <87jymv60ip.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20261102080322.1466478-1-matthias.goergens@gmail.com>
Matthias Goergens <matthias.goergens@gmail.com> writes:
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
>
>> What is the real issue?
>
> Only the data race syzbot reports, "KCSAN: data-race in fat16_ent_put /
> fat_mirror_bhs": fat_mirror_bhs() copies a FAT block to the backup FAT
> while another task updates an entry in that block. I have not found any
> effect on disk. fat_mirror_bhs() holds the backup buffer's lock across
> the copy, and every writer mirrors the block again after its own update,
> so a copy that caught an entry mid-update is replaced by that writer's
> copy. The commit message should have said so, and the patch also lacked
> my Signed-off-by: it went out before it was ready, sorry.
>
> That leaves two ways to deal with the report. Would you prefer marking
> the copy as an intended race, data_race() around the memcpy() with a
> comment on why it is harmless? Or the locking in this patch, which
> holds fat_lock across fat_sync_bhs() for synchronous inodes and so
> makes other allocations wait for that I/O?
I think former. And Actually I explained a few times for similar issues
in past, I didn't add the comment though.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2026-11-02 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 3:32 Matthias Goergens
2026-10-31 4:20 ` OGAWA Hirofumi
2026-11-02 8:03 ` Matthias Goergens
2026-11-02 9:33 ` OGAWA Hirofumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jymv60ip.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.goergens@gmail.com \
--cc=syzbot+018e6f695ad9bccb182a@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®