public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] xfs: bug widening binary "not" operation
@ 2013-05-16  7:53 Dan Carpenter
  2013-05-16 23:03 ` Dave Chinner
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-05-16  7:53 UTC (permalink / raw)
  To: Ben Myers; +Cc: Alex Elder, kernel-janitors, xfs

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-17 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16  7:53 [patch] xfs: bug widening binary "not" operation Dan Carpenter
2013-05-16 23:03 ` Dave Chinner
2013-05-17  6:31   ` Dan Carpenter
2013-05-17 10:19     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox