| To: | Dan Carpenter <dan.carpenter@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [patch] xfs: bug widening binary "not" operation |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Fri, 17 May 2013 09:03:14 +1000 |
| Cc: | Ben Myers <bpm@xxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20130516075330.GB7494@xxxxxxxxxxxxxx> |
| References: | <20130516075330.GB7494@xxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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@xxxxxxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: high-speed disk I/O is CPU-bound?, Dave Chinner |
|---|---|
| Next by Date: | Интернет-реклама для Вашего успешного бизнеса!, Дарья Крылова |
| Previous by Thread: | [patch] xfs: bug widening binary "not" operation, Dan Carpenter |
| Next by Thread: | Re: [patch] xfs: bug widening binary "not" operation, Dan Carpenter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |