All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] xen-blk: bug fixes
@ 2014-02-04 10:26 Roger Pau Monne
  2014-02-04 10:26 ` [PATCH v2 1/4] xen-blkback: fix memory leak when persistent grants are used Roger Pau Monne
                   ` (9 more replies)
  0 siblings, 10 replies; 31+ messages in thread
From: Roger Pau Monne @ 2014-02-04 10:26 UTC (permalink / raw)
  To: xen-devel, linux-kernel

This series contain blkback bug fixes for memory leaks (patches 1 and 
2) and a race (patch 3). Patch 4 removes blkif_request_segment_aligned 
since its memory layout is exactly the same as blkif_request_segment 
and should introduce no functional change.

All patches should be backported to stable branches, although the last 
one is not a functional change it will still be nice to have it for 
code correctness.

^ permalink raw reply	[flat|nested] 31+ messages in thread
* [PATCH v2 2/4] xen-blkback: fix memory leaks
@ 2014-02-07  3:15 Matthew Rushton
  2014-02-12 13:42 ` Egger, Christoph
  0 siblings, 1 reply; 31+ messages in thread
From: Matthew Rushton @ 2014-02-07  3:15 UTC (permalink / raw)
  To: Roger Pau Monne ‎‎
  Cc: Ian Campbell ‎, linux-kernel@vger.kernel.org,
	mrushton@amazon.com, David Vrabel ‎‎‎,
	msw@amazon.com, xen-devel@lists.xenproject.org,
	Boris Ostrovsky ‎, aliguori@amazon.com


[-- Attachment #1.1: Type: text/plain, Size: 1116 bytes --]

On 04/02/14 10:26, Roger Pau Monne wrote:
> 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.

Tested-by: Matt Rushton <mrushton@amazon.com>

Reviewed-by: Matt Rushton <mrushton@amazon.com>

[-- Attachment #1.2: Type: text/html, Size: 2581 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2014-02-12 13:42 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 10:26 [PATCH v2 0/4] xen-blk: bug fixes Roger Pau Monne
2014-02-04 10:26 ` [PATCH v2 1/4] xen-blkback: fix memory leak when persistent grants are used Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:30   ` David Vrabel
2014-02-04 10:30   ` David Vrabel
2014-02-04 10:30   ` David Vrabel
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:26 ` [PATCH v2 2/4] xen-blkback: fix memory leaks Roger Pau Monne
2014-02-04 10:26   ` Roger Pau Monne
2014-02-04 10:32   ` David Vrabel
2014-02-04 10:32   ` David Vrabel
2014-02-04 10:26 ` [PATCH v2 3/4] xen-blkback: fix shutdown race Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:34   ` David Vrabel
2014-02-04 10:34   ` David Vrabel
2014-02-04 10:26 ` [PATCH v2 4/4] xen-blkif: drop struct blkif_request_segment_aligned Roger Pau Monne
2014-02-04 10:26 ` Roger Pau Monne
2014-02-04 10:35   ` David Vrabel
2014-02-04 10:35   ` David Vrabel
2014-02-04 15:15 ` [Xen-devel] [PATCH v2 0/4] xen-blk: bug fixes Konrad Rzeszutek Wilk
2014-02-06  4:57   ` Matt Wilson
2014-02-06 16:20     ` Konrad Rzeszutek Wilk
2014-02-07  4:24       ` Matt Wilson
2014-02-07  4:24       ` [Xen-devel] " Matt Wilson
2014-02-07  8:08         ` Roger Pau Monné
2014-02-07  8:08         ` Roger Pau Monné
2014-02-06 16:20     ` Konrad Rzeszutek Wilk
2014-02-06  4:57   ` Matt Wilson
2014-02-04 15:15 ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2014-02-07  3:15 [PATCH v2 2/4] xen-blkback: fix memory leaks Matthew Rushton
2014-02-12 13:42 ` Egger, Christoph

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.