From: Namjae Jeon <linkinjeon@kernel.org>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>
Cc: "sj1557.seo" <sj1557.seo@samsung.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Wataru.Aoyama@sony.com" <Wataru.Aoyama@sony.com>,
"Andy.Wu@sony.com" <Andy.Wu@sony.com>
Subject: Re: [PATCH] exfat: fix overflow for large capacity partition
Date: Fri, 26 Aug 2022 18:06:20 +0900 [thread overview]
Message-ID: <CAKYAXd8CHkEUc0zD+YoJTzAP91Ppf-cgBVWZ3Ap4PU3hL4njfw@mail.gmail.com> (raw)
In-Reply-To: <PUZPR04MB63161D3BE9104FF48BD298DE81719@PUZPR04MB6316.apcprd04.prod.outlook.com>
2022-08-23 12:26 GMT+09:00, Sungjong Seo <sj1557.seo@samsung.com>:
>> Using int type for sector index, there will be overflow in a large
>> capacity partition.
>>
>> For example, if storage with sector size of 512 bytes and partition
>> capacity is larger than 2TB, there will be overflow.
>>
>> Fixes: 1b6138385499 ("exfat: reduce block requests when zeroing a
>> cluster")
>>
>> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
>> Reviewed-by: Andy Wu <Andy.Wu@sony.com>
>> Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
>
> Looks good!
> Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Applied, Thanks!
>
>>
>> ---
>> fs/exfat/fatent.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c index
>> ee0b7cf51157..41ae4cce1f42 100644
>> --- a/fs/exfat/fatent.c
>> +++ b/fs/exfat/fatent.c
>> @@ -270,8 +270,7 @@ int exfat_zeroed_cluster(struct inode *dir, unsigned
>> int clu)
>> struct super_block *sb = dir->i_sb;
>> struct exfat_sb_info *sbi = EXFAT_SB(sb);
>> struct buffer_head *bh;
>> - sector_t blknr, last_blknr;
>> - int i;
>> + sector_t blknr, last_blknr, i;
>>
>> blknr = exfat_cluster_to_sector(sbi, clu);
>> last_blknr = blknr + sbi->sect_per_clus;
>> --
>> 2.25.1
>
>
>
prev parent reply other threads:[~2022-08-26 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220822022538epcas1p1466d16f6f21532d35b0b2caed3079ef6@epcas1p1.samsung.com>
[not found] ` <PUZPR04MB63161D3BE9104FF48BD298DE81719@PUZPR04MB6316.apcprd04.prod.outlook.com>
2022-08-23 3:26 ` [PATCH] exfat: fix overflow for large capacity partition Sungjong Seo
2022-08-26 9:06 ` Namjae Jeon [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=CAKYAXd8CHkEUc0zD+YoJTzAP91Ppf-cgBVWZ3Ap4PU3hL4njfw@mail.gmail.com \
--to=linkinjeon@kernel.org \
--cc=Andy.Wu@sony.com \
--cc=Wataru.Aoyama@sony.com \
--cc=Yuezhang.Mo@sony.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.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;
as well as URLs for NNTP newsgroup(s).