Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752358Ab2FNFll (ORCPT ); Thu, 14 Jun 2012 01:41:41 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:36088 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115Ab2FNFlk (ORCPT ); Thu, 14 Jun 2012 01:41:40 -0400 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 X-Google-Sender-Auth: uyZbcIGIFEm7QVRCSEXEXQ_6NsI Message-ID: Subject: Re: [PATCH] memory hotplug: fix invalid memory access caused by stale kswapd pointer 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 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 903 Lines: 17 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/