Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757105Ab2FOO23 (ORCPT ); Fri, 15 Jun 2012 10:28:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57093 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756985Ab2FOO22 (ORCPT ); Fri, 15 Jun 2012 10:28:28 -0400 Date: Fri, 15 Jun 2012 15:28:20 +0100 From: Mel Gorman To: Jiang Liu Cc: KOSAKI Motohiro , 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 Subject: Re: [PATCH] memory hotplug: fix invalid memory access caused by stale kswapd pointer Message-ID: <20120615142820.GC20467@suse.de> References: <1339645491-5656-1-git-send-email-jiang.liu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1339645491-5656-1-git-send-email-jiang.liu@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 898 Lines: 22 On Thu, Jun 14, 2012 at 11:44:51AM +0800, 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: Mel Gorman -- Mel Gorman SUSE Labs -- 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/