Original Message
Subject: Re: [PATCH] btrfs: Check superblock csum type to avoid 0
division or array overflow.
From: David Sterba
To: Qu Wenruo
Date: 2015年04月24日 00:16
On Thu, Apr 23, 2015 at 09:31:21AM +0800, Qu Wenruo wrote:
Current btrfs only support CRC32 checksum
On Thu, Apr 23, 2015 at 09:31:21AM +0800, Qu Wenruo wrote:
> Current btrfs only support CRC32 checksum, and if csum_type is 1, we
> will get 0 csum size, causing 0 division later destroy the whole kernel.
> Or csum_type is later than 1, we will get data from other random memory
> causing more probl
Current btrfs only support CRC32 checksum, and if csum_type is 1, we
will get 0 csum size, causing 0 division later destroy the whole kernel.
Or csum_type is later than 1, we will get data from other random memory
causing more problem.
So check csum_type in btrfs_check_super_valid() to avoid such