Btrfs: add more validation checks for superblock
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 3 Jun 2016 19:05:14 +0000 (12:05 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Jun 2016 08:41:53 +0000 (10:41 +0200)
commit99e3ecfcb9f4ca35192d20a5bea158b81f600062
tree41a481ff46b66e463f8824c66834c4402ea836e7
parentd865177a5e749827f248f6363f5100d3a2f66b0f
Btrfs: add more validation checks for superblock

This adds validation checks for super_total_bytes, super_bytes_used and
super_stripesize, super_num_devices.

Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Reported-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c