https://github.com/torvalds/linux
Revision c6482dde1c2811afba289b2344268f850595f350 authored by Arjan van de Ven on 04 July 2006, 10:07:22 UTC, committed by Linus Torvalds on 04 July 2006, 17:24:57 UTC
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 <arjan@linux.intel.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent a46f948
History
Tip revision: c6482dde1c2811afba289b2344268f850595f350 authored by Arjan van de Ven on 04 July 2006, 10:07:22 UTC
[PATCH] fix AB-BA deadlock inversion at cs46xx_dsp_remove_scb
Tip revision: c6482dd
File Mode Size
netfilter
Kconfig -rw-r--r-- 1.2 KB
Makefile -rw-r--r-- 417 bytes
br.c -rw-r--r-- 1.8 KB
br_device.c -rw-r--r-- 4.2 KB
br_fdb.c -rw-r--r-- 8.5 KB
br_forward.c -rw-r--r-- 3.4 KB
br_if.c -rw-r--r-- 9.8 KB
br_input.c -rw-r--r-- 3.7 KB
br_ioctl.c -rw-r--r-- 9.1 KB
br_netfilter.c -rw-r--r-- 30.1 KB
br_netlink.c -rw-r--r-- 4.5 KB
br_notify.c -rw-r--r-- 2.0 KB
br_private.h -rw-r--r-- 7.4 KB
br_private_stp.h -rw-r--r-- 1.7 KB
br_stp.c -rw-r--r-- 10.6 KB
br_stp_bpdu.c -rw-r--r-- 5.3 KB
br_stp_if.c -rw-r--r-- 5.6 KB
br_stp_timer.c -rw-r--r-- 4.6 KB
br_sysfs_br.c -rw-r--r-- 11.3 KB
br_sysfs_if.c -rw-r--r-- 6.2 KB

back to top