Re: [PATCH] fs: btrfs: fix potential overflow

2014-08-25 Thread Brian Norris
On Sun, Aug 24, 2014 at 12:44:11PM +0300, Timofey Titovets wrote: > 2014-08-24 8:41 GMT+03:00 Brian Norris : > > --- a/fs/btrfs/scrub.c > > +++ b/fs/btrfs/scrub.c > > @@ -2320,26 +2320,26 @@ static noinline_for_stack int scrub_stripe(struct > > scrub_ctx *sctx, > > do_div(nstripes, map->st

Re: [PATCH] fs: btrfs: fix potential overflow

2014-08-24 Thread Timofey Titovets
2014-08-24 8:41 GMT+03:00 Brian Norris : > It looks like this intended to be 64-bit arithmetic, but it's actually > performed as 32-bit. Fix that. (Note that 'increment' was being > initialized twice, so this patch removes one of those.) > > Caught by Coverity Scan (CID 1201422). > > Signed-off-by:

[PATCH] fs: btrfs: fix potential overflow

2014-08-23 Thread Brian Norris
It looks like this intended to be 64-bit arithmetic, but it's actually performed as 32-bit. Fix that. (Note that 'increment' was being initialized twice, so this patch removes one of those.) Caught by Coverity Scan (CID 1201422). Signed-off-by: Brian Norris --- Untested fs/btrfs/scrub.c | 12