From: Andreas Dilger <adilger@dilger.ca>
To: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, jack@suse.cz,
aneesh.kumar@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] ext4: ext4_mb_mark_free_simple: Fix integer value truncation
Date: Thu, 3 Nov 2016 13:32:33 -0600 [thread overview]
Message-ID: <2AE0DCBF-5AB6-47B2-B9F6-B738AFF2EAF2@dilger.ca> (raw)
In-Reply-To: <1478164472-28376-1-git-send-email-chandan@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]
On Nov 3, 2016, at 3:14 AM, Chandan Rajendra <chandan@linux.vnet.ibm.com> wrote:
>
> 'border' variable is set to a value of 2 times the block size of the
> underlying filesystem. With 64k block size, the resulting value won't
> fit into a 16-bit variable. Hence this commit changes the data type of
> 'border' to 'unsigned int'.
>
> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> ---
> fs/ext4/mballoc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index f418f55..a937ac7 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -669,7 +669,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb,
> ext4_grpblk_t min;
> ext4_grpblk_t max;
> ext4_grpblk_t chunk;
> - unsigned short border;
> + unsigned int border;
>
> BUG_ON(len > EXT4_CLUSTERS_PER_GROUP(sb));
>
> --
> 2.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2016-11-03 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 9:14 [PATCH] ext4: ext4_mb_mark_free_simple: Fix integer value truncation Chandan Rajendra
2016-11-03 19:32 ` Andreas Dilger [this message]
2016-11-15 2:24 ` Theodore Ts'o
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=2AE0DCBF-5AB6-47B2-B9F6-B738AFF2EAF2@dilger.ca \
--to=adilger@dilger.ca \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=chandan@linux.vnet.ibm.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tytso@mit.edu \
/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