From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx178.postini.com [74.125.245.178]) by kanga.kvack.org (Postfix) with SMTP id A38066B005C for ; Thu, 14 Jun 2012 01:41:40 -0400 (EDT) Received: by yenr5 with SMTP id r5so726999yen.14 for ; Wed, 13 Jun 2012 22:41:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1339645491-5656-1-git-send-email-jiang.liu@huawei.com> References: <1339645491-5656-1-git-send-email-jiang.liu@huawei.com> From: KOSAKI Motohiro Date: Thu, 14 Jun 2012 01:41:19 -0400 Message-ID: Subject: Re: [PATCH] memory hotplug: fix invalid memory access caused by stale kswapd pointer Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Jiang Liu Cc: Mel Gorman , KAMEZAWA Hiroyuki , Andrew Morton , Minchan Kim , Hugh Dickins , Keping Chen , Tony Luck , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xishi Qiu , Jiang Liu On Wed, Jun 13, 2012 at 11:44 PM, Jiang Liu wrote: > Function kswapd_stop() will be called to destroy the kswapd work thread > when all memory of a NUMA node has been offlined. But kswapd_stop() only > terminates the work thread without resetting NODE_DATA(nid)->kswapd to NULL. > The stale pointer will prevent kswapd_run() from creating a new work thread > when adding memory to the memory-less NUMA node again. Eventually the stale > pointer may cause invalid memory access. > > Signed-off-by: Xishi Qiu > Signed-off-by: Jiang Liu Acked-by: KOSAKI Motohiro -- 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: email@kvack.org