Re: [PATCH v2] btrfs: fix integer overflow in calc_reclaim_items_nr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 23, 2017 at 09:48:21AM -0700, Chris Mason wrote:
> Dave Jones hit a WARN_ON(nr < 0) in btrfs_wait_ordered_roots() with
> v4.12-rc6.  This was because commit 70e7af244 made it possible for
> calc_reclaim_items_nr() to return a negative number.  It's not really a
> bug in that commit, it just didn't go far enough down the stack to find
> all the possible 64->32 bit overflows.
> 
> This switches calc_reclaim_items_nr() to return a u64 and changes everyone
> that uses the results of that math to u64 as well.
> 
> Reported-by: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
> Fixes: 70e7af2 ("Btrfs: fix delalloc accounting leak caused by u32 overflow")
> Signed-off-by: Chris Mason <clm@xxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux