From: Arjan van de Ven Date: Tue, 4 Jul 2006 10:07:22 +0000 (-0700) Subject: [PATCH] fix AB-BA deadlock inversion at cs46xx_dsp_remove_scb X-Git-Tag: v2.6.18-rc1~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6482dde1c2811afba289b2344268f850595f350;p=pandora-kernel.git [PATCH] fix AB-BA deadlock inversion at cs46xx_dsp_remove_scb There is a code sequence where the locking is substream->self_group.lock -> ins->scbs[index].lock substream->self_group.lock is interrupt safe, and taken from irq context as well (trace is snipped for brevity) so what can happen is cpu 0 cpu 1 user context user context take ins->scbs[index].lock without disabling interrupts get substream->self_group.lock (irqsafe) try to get ins->scbs[index].lock (spins) interrupt happens try to get substream->self_group.lock (spins) which is an obvious AB-BA deadlock fix is to just take the lock with _irqsafe Signed-off-by: Arjan van de Ven Cc: Jaroslav Kysela Acked-by: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed