]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Exit gracefully when chunk map cannot be inserted to the tree
authorQu Wenruo <wqu@suse.com>
Wed, 1 Aug 2018 02:37:20 +0000 (10:37 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:13:03 +0000 (13:13 +0200)
commit3b8720d2ff59eab5b0f1c933f66578947a39205b
treefaf9455a54d072d1ba33ece10942f4ead8e5b477
parentd71f0ca46830223d68132c1cec7903d20b17501e
btrfs: Exit gracefully when chunk map cannot be inserted to the tree

It's entirely possible that a crafted btrfs image contains overlapping
chunks.

Although we can't detect such problem by tree-checker, it's not a
catastrophic problem, current extent map can already detect such problem
and return -EEXIST.

We just only need to exit gracefully and fail the mount.

Reported-by: Xu Wen <wen.xu@gatech.edu>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200409
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c