diff options
author | NeilBrown <neilb@suse.de> | 2014-04-09 12:25:43 +1000 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-29 11:38:14 +0200 |
commit | 6c662df0d0c0770b92283c45b9566e748812d7b8 (patch) | |
tree | 36db67c4a9468519441078817a46979f3fffb181 /mm/hugetlb.c | |
parent | f0d5a953d2257915fe80ee04f7c9f0e1b021a3ee (diff) |
md/raid1: r1buf_pool_alloc: free allocate pages when subsequent allocation fails.
commit da1aab3dca9aa88ae34ca392470b8943159e25fe 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: a07876064a0b73ab5ef1ebcf14b1cf0231c07858
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions