Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fb8f424 authored by Nick Piggin's avatar Nick Piggin Committed by Pekka Enberg
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
Acked-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent b578f3fc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)) {