From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: zhoumin <teczm@foxmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfat: fix uninitialized i_pos error
Date: Wed, 20 Aug 2025 00:36:50 +0900 [thread overview]
Message-ID: <87o6sbz5kd.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <tencent_8DDA7086C9B39312179B5CE9430B891C1605@qq.com>
zhoumin <teczm@foxmail.com> writes:
> The i_pos field remains uninitialized when fat_fs_error_ratelimit() reports
> error, e.g.,
>
> [ 1642.703550] FAT-fs (loop0): error, fat_get_cluster: invalid
> cluster chain (i_pos 0)
>
> Since i_pos is assigned in fat_attach after fat_fill_inode, the error
> message lacks useful debug info.
>
> Path:
> vfat_lookup
> fat_build_inode
> fat_fill_inode
> fat_calc_dir_size
> fat_get_cluster /* report error */
> fat_attach /* i_pos assigned here */
No. It is initialized as 0, and it must be unavailable outside
between fat_attach and fat_detach.
IOW, this is introducing the race.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2025-08-19 15:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 15:00 zhoumin
2025-08-19 15:36 ` OGAWA Hirofumi [this message]
2025-08-19 16:17 ` zhoumin
2025-08-19 16:57 ` OGAWA Hirofumi
2025-08-19 17:28 ` zhoumin
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=87o6sbz5kd.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=teczm@foxmail.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®