Files
linux/drivers/md
NeilBrown fdc9aa48b7 md/raid1: r1buf_pool_alloc: free allocate pages when subsequent allocation fails.
commit da1aab3dca upstream.

When performing a user-request check/repair (MD_RECOVERY_REQUEST is set)
on a raid1, we allocate multiple bios each with their own set of pages.

If the page allocations for one bio fails, we currently do *not* free
the pages allocated for the previous bios, nor do we free the bio itself.

This patch frees all the already-allocate pages, and makes sure that
all the bios are freed as well.

This bug can cause a memory leak which can ultimately OOM a machine.
It was introduced in 3.10-rc1.

Fixes: a07876064a
Cc: Kent Overstreet <koverstreet@google.com>
Reported-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-30 21:52:12 -07:00
..
2014-02-06 11:08:16 -08:00
2013-04-24 11:42:41 +10:00
2013-03-01 22:45:51 +00:00
2013-03-01 22:45:51 +00:00
2012-03-28 18:41:29 +01:00
2013-03-01 22:45:51 +00:00
2012-07-30 17:25:16 -07:00
2014-02-13 13:48:02 -08:00
2013-03-01 22:45:47 +00:00
2014-02-13 13:48:02 -08:00
2014-02-13 13:48:02 -08:00
2013-03-23 14:15:29 -07:00
2014-02-13 13:48:02 -08:00
2013-03-23 14:15:29 -07:00
2014-02-13 13:48:02 -08:00