xen-blkback: fix memory leak when persistent grants are used
authorMatt Rushton <mrushton@amazon.com>
Tue, 4 Feb 2014 10:26:12 +0000 (11:26 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 7 Feb 2014 17:58:18 +0000 (12:58 -0500)
commit2ed22e3c3bec5b92b9aba4afdef0cc5e6d859a11
tree2f8931eda57be083e4270279f37d7781591bbd48
parent802eee95bde72fd0cd0f3a5b2098375a487d1eda
xen-blkback: fix memory leak when persistent grants are used

Currently shrink_free_pagepool() is called before the pages used for
persistent grants are released via free_persistent_gnts(). This
results in a memory leak when a VBD that uses persistent grants is
torn down.

Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xen.org
Cc: Anthony Liguori <aliguori@amazon.com>
Signed-off-by: Matt Rushton <mrushton@amazon.com>
Signed-off-by: Matt Wilson <msw@amazon.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c