Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1264252 > unrolled thread

[PATCH 4.2 069/110] dm btree: fix leak of bufio-backed block in btree_split_beneath error path

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2015-11-06 20:30 +0100
Last post2015-11-06 20:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.2 069/110] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:30 +0100

#1264252 — [PATCH 4.2 069/110] dm btree: fix leak of bufio-backed block in btree_split_beneath error path

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2015-11-06 20:30 +0100
Subject[PATCH 4.2 069/110] dm btree: fix leak of bufio-backed block in btree_split_beneath error path
Message-ID<qrURY-d0-23@gated-at.bofh.it>
4.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mike Snitzer <snitzer@redhat.com>

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/persistent-data/dm-btree.c
+++ b/drivers/md/persistent-data/dm-btree.c
@@ -523,7 +523,7 @@ static int btree_split_beneath(struct sh
 
 	r = new_block(s->info, &right);
 	if (r < 0) {
-		/* FIXME: put left */
+		unlock_block(s->info, left);
 		return r;
 	}
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web