From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Richard Ems <Richard.Ems@cape-horn-eng.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] fix overflow in xfs_growfs_data_private
Date: Mon, 25 May 2009 06:15:29 -0400 [thread overview]
Message-ID: <20090525101529.GA24124@infradead.org> (raw)
In-Reply-To: <4A184EC4.1050007@sandeen.net>
On Sat, May 23, 2009 at 02:30:12PM -0500, Eric Sandeen wrote:
> Index: linux-2.6/fs/xfs/xfs_fsops.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/xfs_fsops.c
> +++ linux-2.6/fs/xfs/xfs_fsops.c
> @@ -160,7 +160,7 @@ xfs_growfs_data_private(
> nagcount = new + (nb_mod != 0);
> if (nb_mod && nb_mod < XFS_MIN_AG_BLOCKS) {
> nagcount--;
> - nb = nagcount * mp->m_sb.sb_agblocks;
> + nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks;
> if (nb < mp->m_sb.sb_dblocks)
> return XFS_ERROR(EINVAL);
Nice one! Thanks dear C integer promotion rules..
Would be good to get this into 2.6.30
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-05-25 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 19:30 [PATCH] fix overflow in xfs_growfs_data_private Eric Sandeen
2009-05-25 10:15 ` Christoph Hellwig [this message]
2009-05-26 12:23 ` Felix Blyakher
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=20090525101529.GA24124@infradead.org \
--to=hch@infradead.org \
--cc=Richard.Ems@cape-horn-eng.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.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