mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: YangWen <anmuxixixi@gmail.com>
To: hirofumi@mail.parknet.co.jp
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: fix data-race between fat12_ent_put() and fat_mirror_bhs()
Date: Tue,  2 Sep 2025 21:24:59 +0800	[thread overview]
Message-ID: <20250902132459.44-1-anmuxixixi@gmail.com> (raw)
In-Reply-To: <87tt1lowqd.fsf@mail.parknet.co.jp>

Hi,

OGAWA Hirofumi wrote:
> Sounds like strange. FAT driver never read the mirror FAT area in
> runtime. Why did you think the mirror FAT affect to it?

Thanks for raising this point.

FAT driver itself never reads the mirror FAT at
runtime, so this race does not directly cause runtime corruption.

However, if the primary FAT on disk becomes damaged, user-space tools
such as fsck_msdos will consult the backup FAT copies in order to
repair it.  In that scenario, keeping the primary and backup FAT copies
consistent is important.  If they diverge due to a race between
fat12_ent_put() and fat_mirror_bhs(), recovery by fsck_msdos
may become unreliable.

So my intention was not to fix a runtime problem, but rather to prevent
unnecessary inconsistencies between the primary and backup FAT copies,
which can help later recovery tools work as expected.

Thanks.


  reply	other threads:[~2025-09-02 13:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02  8:17 YangWen
2025-09-02  9:01 ` OGAWA Hirofumi
2025-09-02 12:07   ` [PATCH] drivers: example: fix memory leak YangWen
2025-09-02 12:38     ` OGAWA Hirofumi
2025-09-02 13:24       ` YangWen [this message]
2025-09-02 13:38         ` [PATCH] fat: fix data-race between fat12_ent_put() and fat_mirror_bhs() OGAWA Hirofumi
2025-09-02 14:20           ` YangWen
2025-09-02 18:05             ` OGAWA Hirofumi
2025-09-03  2:28               ` YangWen
2025-09-02 12:11   ` YangWen
2025-09-02 19:56 ` kernel test robot

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=20250902132459.44-1-anmuxixixi@gmail.com \
    --to=anmuxixixi@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /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®