diff options
author | David Rientjes <rientjes@google.com> | 2018-10-27 00:09:24 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 01:26:35 +0200 |
commit | 4a222127f3631e6cdde228e3bb6b599f52b96d14 (patch) | |
tree | 3491c4f5c4a8eb4f0ca2e9ae416a53fcdce009ea /mm/memcontrol.c | |
parent | mm/zsmalloc.c: fix fall-through annotation (diff) | |
download | linux-4a222127f3631e6cdde228e3bb6b599f52b96d14.tar.xz linux-4a222127f3631e6cdde228e3bb6b599f52b96d14.zip |
mm/page_alloc.c: initialize num_movable in move_freepages()
If move_freepages_block() returns 0 because !zone_spans_pfn(),
*num_movable can hold the value from the stack because it does not get
initialized in move_freepages().
Move the initialization to move_freepages_block() to guarantee the value
actually makes sense.
This currently doesn't affect its only caller where num_movable != NULL,
so no bug fix, but just more robust.
Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1810051355490.212229@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions