Thread (5 messages) 5 messages, 2 authors, 2016-07-07

Re: [PATCH v2] Btrfs: error out if generic_bin_search get invalid arguments

From: David Sterba <hidden>
Date: 2016-07-07 12:12:04

On Thu, Jun 23, 2016 at 04:32:45PM -0700, Liu Bo wrote:
With btrfs-corrupt-block, one can set btree node/leaf's field, if
we assign a negative value to node/leaf, we can get various hangs,
eg. if extent_root's nritems is -2ULL, then we get stuck in
 btrfs_read_block_groups() because it has a while loop and
btrfs_search_slot() on extent_root will always return the first
 child.

This lets us know what's happening and returns a EINVAL to callers
instead of returning the first item.

Signed-off-by: Liu Bo <redacted>
Reviewed-by: David Sterba <dsterba@suse.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help