From: Dave Chinner <david@fromorbit.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ben Myers <bpm@sgi.com>, Alex Elder <elder@kernel.org>,
kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [patch] xfs: bug widening binary "not" operation
Date: Fri, 17 May 2013 09:03:14 +1000 [thread overview]
Message-ID: <20130516230314.GH24635@dastard> (raw)
In-Reply-To: <20130516075330.GB7494@elgon.mountain>
On Thu, May 16, 2013 at 10:53:30AM +0300, Dan Carpenter wrote:
> 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.
It is a real problem, but one that is masked by the way we do range
flushing right now.
As it is, the static checker missed the:
rounding = max_t(uint, ....);
The line before the above usage. I posted a patch to fix this this
2 weeks ago here:
http://oss.sgi.com/pipermail/xfs/2013-May/025986.html
But thanks for the independent confirmation of the problem, Dan. ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-05-16 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 7:53 [patch] xfs: bug widening binary "not" operation Dan Carpenter
2013-05-16 23:03 ` Dave Chinner [this message]
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=20130516230314.GH24635@dastard \
--to=david@fromorbit.com \
--cc=bpm@sgi.com \
--cc=dan.carpenter@oracle.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