mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krystian Kaniewski <krystianmkaniewski@gmail.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	syzbot+b0aebd03565f5774f7f8@syzkaller.appspotmail.com
Subject: Re: [PATCH] fat: validate dotdot buffers in VFAT and MSDOS rename and rollback
Date: Wed, 30 Sep 2026 14:17:55 +0200	[thread overview]
Message-ID: <9359c431-d21e-471d-a3e1-76711da7aabb@gmail.com> (raw)
In-Reply-To: <87ld8j4161.fsf@mail.parknet.co.jp>

On 9/30/26 10:02, OGAWA Hirofumi wrote:
>> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
>> index 35bdb6294..cee06e635 100644
>> --- a/fs/fat/dir.c
>> +++ b/fs/fat/dir.c
>> @@ -941,6 +941,40 @@ int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh,
>>  }
>>  EXPORT_SYMBOL_GPL(fat_get_dotdot_entry);
>>  
>> +static int __fat_update_dotdot_de(struct inode *dir, struct inode *inode,
>> +				  struct buffer_head *dotdot_bh,
>> +				  struct msdos_dir_entry *dotdot_de,
>> +				  bool force_sync)
>> +{
>> +	lock_buffer(dotdot_bh);
> 
> This looks like unnecessarily wait the completion of buffer I/O, isn't
> it? I guess, it is ok to give up to revert if surely I/O error, because
> the reverted buffer will be the I/O error again.
> 
> Thanks.
> 
Indeed, lock_buffer() may be a bit of an overkill here. I’ll rework the patch to track the buffer whose synchronous write failed and skip rollback operations that would modify the same buffer, while still rolling back entries stored in other buffers.
Thanks for the suggestion.
-- 
Krystian Kaniewski

      reply	other threads:[~2026-09-30 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 16:38 [syzbot] [exfat?] WARNING in vfat_update_dotdot_de syzbot
2026-09-29  9:00 ` [PATCH] fat: validate dotdot buffers in VFAT and MSDOS rename and rollback Krystian Kaniewski
2026-09-30  8:02   ` OGAWA Hirofumi
2026-09-30 12:17     ` Krystian Kaniewski [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=9359c431-d21e-471d-a3e1-76711da7aabb@gmail.com \
    --to=krystianmkaniewski@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+b0aebd03565f5774f7f8@syzkaller.appspotmail.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®