On Wed, Mar 29, 2017 at 09:33:22AM +0800, Qu Wenruo wrote:
> scrub_setup_recheck_block() calls btrfs_map_sblock() and then access
> bbio without protection of bio_counter.
>
s/access/accesses/
> This can leads to use-after-free if racing with dev replace cancel.
>
s/leads/lead/
> Fix it by
scrub_setup_recheck_block() calls btrfs_map_sblock() and then access
bbio without protection of bio_counter.
This can leads to use-after-free if racing with dev replace cancel.
Fix it by increasing bio_counter before calling btrfs_map_sblock() and
decrease the bio_counter when corresponding