aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-08-15 16:06:06 -0400
committerBen Hutchings <ben@decadent.org.uk>2014-11-05 20:27:38 +0000
commitc039250e175f15b4fa15c2aa6ae0b14162eff27d (patch)
tree477d2c23e31f7a30435049cc089a1be71e582d21 /mm/oom_kill.c
parent6856061748aced168123cc77a8c16ada57825719 (diff)
downloadkernel_samsung_smdk4412-c039250e175f15b4fa15c2aa6ae0b14162eff27d.zip
kernel_samsung_smdk4412-c039250e175f15b4fa15c2aa6ae0b14162eff27d.tar.gz
kernel_samsung_smdk4412-c039250e175f15b4fa15c2aa6ae0b14162eff27d.tar.bz2
percpu: fix pcpu_alloc_pages() failure path
commit f0d279654dea22b7a6ad34b9334aee80cda62cde upstream. When pcpu_alloc_pages() fails midway, pcpu_free_pages() is invoked to free what has already been allocated. The invocation is across the whole requested range and pcpu_free_pages() will try to free all non-NULL pages; unfortunately, this is incorrect as pcpu_get_pages_and_bitmap(), unlike what its comment suggests, doesn't clear the pages array and thus the array may have entries from the previous invocations making the partial failure path free incorrect pages. Fix it by open-coding the partial freeing of the already allocated pages. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions