lkml.org 
[lkml]   [2012]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
On Tue, Aug 21, 2012 at 02:31:19PM +0800, Wen Congyang wrote:
> 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>

Nitpick: Why doesn't online_pages check kswapd_run's return value?
I hope memory-hotplug can handle this error rightly without
relying on this patch in the future.

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2012-08-21 10:21    [W:0.029 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site