]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: promote debugging asserts to full-fledged checks in validate_super
authorNikolay Borisov <nborisov@suse.com>
Mon, 31 May 2021 09:26:01 +0000 (12:26 +0300)
committerDavid Sterba <dsterba@suse.com>
Fri, 4 Jun 2021 11:12:06 +0000 (13:12 +0200)
commit044a37cc31ecd694fb4d11c7be515ca364190ed2
tree928eb370d723e46a571f7c7e5cba750a9be4e87f
parentc82b23cafd2d65729304d319f005224930448407
btrfs: promote debugging asserts to full-fledged checks in validate_super

Syzbot managed to trigger this assert while performing its fuzzing.
Turns out it's better to have those asserts turned into full-fledged
checks so that in case buggy btrfs images are mounted the users gets
an error and mounting is stopped. Alternatively with CONFIG_BTRFS_ASSERT
disabled such image would have been erroneously allowed to be mounted.

Reported-by: syzbot+a6bf271c02e4fe66b4e4@syzkaller.appspotmail.com
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add uuids to the messages ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c