Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbc55faa64c12f4c9fab6e2bd131d771bc026ed1
Commit:     dbc55faa64c12f4c9fab6e2bd131d771bc026ed1
Parent:     746976a301ac9c9aa10d7d42454f8d6cdad8ff2b
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 3 09:31:04 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 3 13:56:13 2007 -0700

    SLUB: Make lockdep happy by not calling add_partial with interrupts enabled 
during bootstrap
    
    If we move the local_irq_enable() to the end of the function then
    add_partial() in early_kmem_cache_node_alloc() will be called
    with interrupts disabled like during regular operations.
    
    This makes lockdep happy.
    
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Tested-by: Andre Noll <[EMAIL PROTECTED]>
    Acked-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/slub.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 202049a..0437f2f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1798,8 +1798,6 @@ static struct kmem_cache_node * __init 
early_kmem_cache_node_alloc(gfp_t gfpflag
        BUG_ON(kmalloc_caches->size < sizeof(struct kmem_cache_node));
 
        page = new_slab(kmalloc_caches, gfpflags | GFP_THISNODE, node);
-       /* new_slab() disables interupts */
-       local_irq_enable();
 
        BUG_ON(!page);
        n = page->freelist;
@@ -1811,6 +1809,12 @@ static struct kmem_cache_node * __init 
early_kmem_cache_node_alloc(gfp_t gfpflag
        init_kmem_cache_node(n);
        atomic_long_inc(&n->nr_slabs);
        add_partial(n, page);
+
+       /*
+        * new_slab() disables interupts. If we do not reenable interrupts here
+        * then bootup would continue with interrupts disabled.
+        */
+       local_irq_enable();
        return n;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to