]> git.ipfire.org Git - people/ms/linux.git/commit
dm btree: fix leak of bufio-backed block in btree_split_beneath error path
authorMike Snitzer <snitzer@redhat.com>
Thu, 22 Oct 2015 14:56:40 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 20:50:25 +0000 (12:50 -0800)
commitbb601ba313dd3b1a7fd78b6a64b6b069627afda5
tree7b62c2372a923c68d4b57d3e09d45e53a00bdcff
parent36ce17424c89564f46ac535d666a5d4973678c5a
dm btree: fix leak of bufio-backed block in btree_split_beneath error path

commit 4dcb8b57df3593dcb20481d9d6cf79d1dc1534be upstream.

btree_split_beneath()'s error path had an outstanding FIXME that speaks
directly to the potential for _not_ cleaning up a previously allocated
bufio-backed block.

Fix this by releasing the previously allocated bufio block using
unlock_block().

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/persistent-data/dm-btree.c