[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e8dbfec28946937e04c901fec26f1f0676d46ce6.1416319692.git.jslaby@suse.cz>
Date: Tue, 18 Nov 2014 15:07:19 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Roger Pau Monné <roger.pau@...rix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 084/206] xen-blkback: fix leak on grant map error path
From: Roger Pau Monné <roger.pau@...rix.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 61cecca865280bef4f8a9748d0a9afa5df351ac2 upstream.
Fix leaking a page when a grant mapping has failed.
Signed-off-by: Roger Pau Monné <roger.pau@...rix.com>
Reported-and-Tested-by: Tao Chen <boby.chen@...wei.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/block/xen-blkback/blkback.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 6620b73d0490..6beaaf83680e 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -755,6 +755,7 @@ again:
BUG_ON(new_map_idx >= segs_to_map);
if (unlikely(map[new_map_idx].status != 0)) {
pr_debug(DRV_PFX "invalid buffer -- could not remap it\n");
+ put_free_pages(blkif, &pages[seg_idx]->page, 1);
pages[seg_idx]->handle = BLKBACK_INVALID_HANDLE;
ret |= 1;
goto next;
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists