Commit 22d8a33d authored by Yuxuan Shui's avatar Yuxuan Shui Committed by Kent Overstreet
Browse files

bcachefs: fix stack corruption



When a bkey_on_stack is passed to bch_read_indirect_extent, there is no
guarantee that it will be big enough to hold the bkey. And
bch_read_indirect_extent is not aware of bkey_on_stack to call realloc
on it. This cause a stack corruption.

This commit makes bch_read_indirect_extent aware of bkey_on_stack so it
can call realloc when appropriate.

Tested-by: default avatarYuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: default avatarYuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a1b0da45
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment