Patch "xen/xenbus: Don't leak memory when unmapping the ring on HVM backend" has been added to the 4.1-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
xen/xenbus: Don't leak memory when unmapping the ring on HVM backend
to the 4.1-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:
xen-xenbus-don-t-leak-memory-when-unmapping-the-ring-on-hvm-backend.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c22fe519e7e2b94ad173e0ea3b89c1a7d8be8d00Mon Sep 17 00:00:00 2001
From: Julien Grall <[email protected]>
Date: Mon, 10 Aug 2015 19:10:38 +0100
Subject: xen/xenbus: Don't leak memory when unmapping the ring on HVM backend
From: Julien Grall <[email protected]>
commit c22fe519e7e2b94ad173e0ea3b89c1a7d8be8d00 upstream.
The commit ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d "xenbus_client:
Extend interface to support multi-page ring" removes the call to free_xenballooned_pages() in xenbus_unmap_ring_vfree_hvm(), leaking a page for every shared ring.
Only with backends running in HVM domains were affected.
--- drivers/xen/xenbus/xenbus_client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/xen/xenbus/xenbus_client.c +3 -1
@@ -814,8 +814,10 @@ static int xenbus_unmap_ring_vfree_hvm(s rv =xenbus_unmap_ring (dev, node->handles, node->nr_handles, addrs); -if (!rv) +if (!rv) {vunmap (vaddr); +free_xenballooned_pages (node->nr_handles, node->hvm.pages); + }else WARN (1 ,"Leaking %p, size %u page(s)\n" , vaddr, node->nr_handles);
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/xen-xenbus-don-t-leak-memory-when-unmapping-the-ring-on-hvm-backend.patch