Skip to content

Commit

Permalink
[PATCH] Fix broken kmalloc_node in rc1/rc2
Browse files Browse the repository at this point in the history
This patch used to be in Andrew's tree before the NUMA slab allocator went
in. Either this patch or the NUMA slab allocator is needed in order for
kmalloc_node to work correctly.

pcibus_to_node may be used to generate the node information passed to
kmalloc_node. pcibus_to_node returns -1 if it was not able to determine
on which node a pcibus is located. For that case kmalloc_node must
work like kmalloc.

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jul 6, 2005
1 parent b463448 commit 83b78bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid)
struct slab *slabp;
kmem_bufctl_t next;

if (nodeid == -1)
return kmem_cache_alloc(cachep, flags);

for (loop = 0;;loop++) {
struct list_head *q;

Expand Down

0 comments on commit 83b78bd

Please sign in to comment.