On Thu, 28 Jun 2012, Gavin Shan wrote: > >> +{ > >> + unsigned long size = SECTIONS_PER_ROOT * > >> + sizeof(struct mem_section); > >> + > >> + if (!section) > >> + return; > >> + > >> + if (slab_is_available()) > >> + kfree(section); > >> + else > >> + free_bootmem_node(NODE_DATA(nid), > >> + virt_to_phys(section), size); > > > >Did you check what happens here if !node_state(nid, N_HIGH_MEMORY)? > > > > I'm sorry that I'm not catching your point. Please explain for more > if necessary. > I'm asking specifically about the free_bootmem_node(NODE_DATA(nid), ...). If this section was allocated in sparse_index_alloc() before slab_is_available() with alloc_bootmem_node() and nid is not in N_HIGH_MEMORY, will alloc_bootmem_node() fallback to any node or return NULL? If it falls back to any node, is it safe to try to free that section by passing NODE_DATA(nid) here when it wasn't allocated on that nid? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>