From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>,
kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: [patch] xfs: bug widening binary "not" operation
Date: Thu, 16 May 2013 10:53:30 +0300 [thread overview]
Message-ID: <20130516075330.GB7494@elgon.mountain> (raw)
The problem here is:
ioffset = offset & ~(rounding - 1);
"offset" and "ioffset" are type xfs_off_t (__s64) and "rounding" is
unsigned int. The "offset & ~(rounding - 1)" clears the high 32 bits
and which is unintentional.
This is a static checker fix so I'm not sure how much difference this
makes in real life.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 1501f4f..9f557c6 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -1453,7 +1453,7 @@ xfs_free_file_space(
xfs_mount_t *mp;
int nimap;
uint resblks;
- uint rounding;
+ xfs_off_t rounding;
int rt;
xfs_fileoff_t startoffset_fsb;
xfs_trans_t *tp;
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-05-16 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 7:53 Dan Carpenter [this message]
2013-05-16 23:03 ` [patch] xfs: bug widening binary "not" operation Dave Chinner
2013-05-17 6:31 ` Dan Carpenter
2013-05-17 10:19 ` Dave Chinner
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=20130516075330.GB7494@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=bpm@sgi.com \
--cc=elder@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--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