From: Nick Piggin Date: Mon, 16 Mar 2009 10:00:28 +0000 (+1100) Subject: slob: fix lockup in slob_free() X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6fb8f424393025674fde7869b59f485d1e352182;p=linux-2.6-omap-h63xx.git slob: fix lockup in slob_free() Don't hold SLOB lock when freeing the page. Reduces lock hold width. See the following thread for discussion of the bug: http://marc.info/?l=linux-kernel&m=123709983214143&w=2 Reported-by: Ingo Molnar Acked-by: Matt Mackall Signed-off-by: Nick Piggin Signed-off-by: Pekka Enberg --- diff --git a/mm/slob.c b/mm/slob.c index bf7e8fc3aed..f901653707a 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -393,10 +393,11 @@ static void slob_free(void *block, int size) /* Go directly to page allocator. Do not pass slob allocator */ if (slob_page_free(sp)) clear_slob_page_free(sp); + spin_unlock_irqrestore(&slob_lock, flags); clear_slob_page(sp); free_slob_page(sp); free_page((unsigned long)b); - goto out; + return; } if (!slob_page_free(sp)) {