]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix use after free when close_ctree frees the orphan_rsv
authorChris Mason <clm@fb.com>
Tue, 7 Apr 2015 01:17:00 +0000 (18:17 -0700)
committerChris Mason <clm@fb.com>
Fri, 10 Apr 2015 21:07:29 +0000 (14:07 -0700)
commit03f4365003dd2c0be47f9e56fefb99b384e4c9b9
tree43c59bd16f29e6e8fb9ff045ce20a16a4275c715
parent6a258f627cc1e6dc0ef01aad3d55aee054d0860c
Btrfs: fix use after free when close_ctree frees the orphan_rsv

Near the end of close_ctree, we're calling btrfs_free_block_rsv
to free up the orphan rsv.  The problem is this call updates the
space_info, which has already been freed.

This adds a new __ function that directly calls kfree instead of trying
to update the space infos.

Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c