All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc.patch added to -mm tree
@ 2013-03-22 19:37 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-03-22 19:37 UTC (permalink / raw)
  To: mm-commits; +Cc: wujianguo, jiang.liu, tangchen


The patch titled
     Subject: mm/hotplug: only free wait_table if it's allocated by vmalloc
has been added to the -mm tree.  Its filename is
     mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Jianguo Wu <wujianguo@huawei.com>
Subject: mm/hotplug: only free wait_table if it's allocated by vmalloc

zone->wait_table may be allocated from bootmem, it can not be freed.

Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Reviewed-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memory_hotplug.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN mm/memory_hotplug.c~mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc
+++ a/mm/memory_hotplug.c
@@ -1779,7 +1779,11 @@ void try_offline_node(int nid)
 	for (i = 0; i < MAX_NR_ZONES; i++) {
 		struct zone *zone = pgdat->node_zones + i;
 
-		if (zone->wait_table)
+		/*
+		 * wait_table may be allocated from boot memory,
+		 * here only free if it's allocated by vmalloc.
+		 */
+		if (is_vmalloc_addr(zone->wait_table))
 			vfree(zone->wait_table);
 	}
 
_

Patches currently in -mm which might be from wujianguo@huawei.com are

linux-next.patch
mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc.patch
arch-x86-mm-init_64c-fix-build-warning-when-config_memory_hotremove=n.patch
mm-migrate-fix-comment-typo-syncronous-synchronous.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-22 19:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 19:37 + mm-hotplug-only-free-wait_table-if-its-allocated-by-vmalloc.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.