From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:56527 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757248AbbKFG2n (ORCPT ); Fri, 6 Nov 2015 01:28:43 -0500 Subject: Patch "dm btree: fix leak of bufio-backed block in btree_split_beneath error path" has been added to the 3.14-stable tree To: snitzer@redhat.com, gregkh@linuxfoundation.org, mpatocka@redhat.com, thornber@redhat.com Cc: , From: Date: Thu, 05 Nov 2015 22:28:41 -0800 Message-ID: <144679132136198@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 4dcb8b57df3593dcb20481d9d6cf79d1dc1534be Mon Sep 17 00:00:00 2001 From: Mike Snitzer 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 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 Signed-off-by: Mike Snitzer Acked-by: Joe Thornber Signed-off-by: Greg Kroah-Hartman --- 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