diff options
author | Roger Pau Monne <[email protected]> | 2014-02-04 11:26:13 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <[email protected]> | 2014-02-07 12:58:46 -0500 |
commit | ef753411339eae46b9a3151906901f8bfd12b0f1 (patch) | |
tree | dbc12f7ba93c1d7b1be02202ecb100e2509257e8 /lib/cpu-notifier-error-inject.c | |
parent | 2ed22e3c3bec5b92b9aba4afdef0cc5e6d859a11 (diff) |
xen-blkback: fix memory leaks
I've at least identified two possible memory leaks in blkback, both
related to the shutdown path of a VBD:
- blkback doesn't wait for any pending purge work to finish before
cleaning the list of free_pages. The purge work will call
put_free_pages and thus we might end up with pages being added to
the free_pages list after we have emptied it. Fix this by making
sure there's no pending purge work before exiting
xen_blkif_schedule, and moving the free_page cleanup code to
xen_blkif_free.
- blkback doesn't wait for pending requests to end before cleaning
persistent grants and the list of free_pages. Again this can add
pages to the free_pages list or persistent grants to the
persistent_gnts red-black tree. Fixed by moving the persistent
grants and free_pages cleanup code to xen_blkif_free.
Also, add some checks in xen_blkif_free to make sure we are cleaning
everything.
Signed-off-by: Roger Pau Monné <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Reviewed-by: David Vrabel <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Tested-by: Matt Rushton <[email protected]>
Reviewed-by: Matt Rushton <[email protected]>
Cc: Matt Wilson <[email protected]>
Cc: Ian Campbell <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions