diff options
author | Wen Congyang | 2012-09-17 14:08:55 -0700 |
---|---|---|
committer | Linus Torvalds | 2012-09-17 15:00:37 -0700 |
commit | 18b48d5873a6fc8e0e6044ddb572fcda26988f19 (patch) | |
tree | 0f26f8c1e70b8d07b1e45b36f0dfc1b1c7a60131 /mm/bootmem.c | |
parent | 6bf6104573482570f7103d3e5ddf9574db43a363 (diff) |
memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
If kthread_run() fails, pgdat->kswapd contains errno. When we stop this
thread, we only check whether pgdat->kswapd is NULL and access it. If
it contains errno, it will cause page fault. Reset pgdat->kswapd to
NULL when creating kernel thread fails can avoid this problem.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/bootmem.c')
0 files changed, 0 insertions, 0 deletions