From: Wen Congyang Date: Mon, 17 Sep 2012 21:08:55 +0000 (-0700) Subject: memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails X-Git-Tag: v3.6-rc7~34^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18b48d5873a6fc8e0e6044ddb572fcda26988f19;p=pandora-kernel.git 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 Reviewed-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed