linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	mgorman@suse.de,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	hughd@google.com, linux-mm@kvack.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
Date: Tue, 21 Aug 2012 16:37:38 +0900	[thread overview]
Message-ID: <20120821073738.GA24667@bbox> (raw)
In-Reply-To: <50332B37.2000500@cn.fujitsu.com>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2012-08-21  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  6:31 [PATCH] memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails Wen Congyang
2012-08-21  7:37 ` Minchan Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120821073738.GA24667@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=wency@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).