stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "dm btree: fix leak of bufio-backed block in btree_split_beneath error path" has been added to the 3.14-stable tree
@ 2015-11-06  6:28 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-11-06  6:28 UTC (permalink / raw)
  To: snitzer, gregkh, mpatocka, thornber; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    dm btree: fix leak of bufio-backed block in btree_split_beneath error path

to the 3.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-btree-fix-leak-of-bufio-backed-block-in-btree_split_beneath-error-path.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 4dcb8b57df3593dcb20481d9d6cf79d1dc1534be Mon Sep 17 00:00:00 2001
From: Mike Snitzer <snitzer@redhat.com>
Date: Thu, 22 Oct 2015 10:56:40 -0400
Subject: dm btree: fix leak of bufio-backed block in btree_split_beneath error path

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;
 	}
 


Patches currently in stable-queue which might be from snitzer@redhat.com are

queue-3.14/dm-btree-fix-leak-of-bufio-backed-block-in-btree_split_beneath-error-path.patch
queue-3.14/dm-btree-remove-fix-a-bug-when-rebalancing-nodes-after-removal.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-06  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06  6:28 Patch "dm btree: fix leak of bufio-backed block in btree_split_beneath error path" has been added to the 3.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).