android_kernel_xiaomi_sm8350/lib
Roland Dreier c259cc2812 [PATCH] Convert idr's internal locking to _irqsave variant
Currently, the code in lib/idr.c uses a bare spin_lock(&idp->lock) to do
internal locking.  This is a nasty trap for code that might call idr
functions from different contexts; for example, it seems perfectly
reasonable to call idr_get_new() from process context and idr_remove() from
interrupt context -- but with the current locking this would lead to a
potential deadlock.

The simplest fix for this is to just convert the idr locking to use
spin_lock_irqsave().

In particular, this fixes a very complicated locking issue detected by
lockdep, involving the ib_ipoib driver's priv->lock and dev->_xmit_lock,
which get involved with the ib_sa module's query_idr.lock.

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Zach Brown <zach.brown@oracle.com>,
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-14 21:53:54 -07:00
..
reed_solomon [PATCH] reed-solomon: fix kernel-doc comments 2006-06-25 10:01:23 -07:00
zlib_deflate [PATCH] zlib_inflate: Upgrade library code to a recent version 2006-06-22 15:05:58 -07:00
zlib_inflate [PATCH] zlib inflate: fix function definitions 2006-06-27 17:32:35 -07:00
.gitignore
bitmap.c [PATCH] kernel-doc for lib/bitmap.c 2006-06-25 10:01:20 -07:00
bust_spinlocks.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cmdline.c
cpumask.c
crc16.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
crc32.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
crc32defs.h
crc-ccitt.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
ctype.c
debug_locks.c [PATCH] lockdep: better lock debugging 2006-07-03 15:27:01 -07:00
dec_and_lock.c
div64.c
dump_stack.c
errno.c
extable.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
find_next_bit.c
gen_crc32table.c
genalloc.c [PATCH] change gen_pool allocator to not touch managed memory 2006-06-23 07:42:49 -07:00
halfmd4.c
hweight.c
idr.c [PATCH] Convert idr's internal locking to _irqsave variant 2006-07-14 21:53:54 -07:00
inflate.c
int_sqrt.c
iomap_copy.c [PATCH] add __iowrite64_copy 2006-06-20 20:24:58 -07:00
iomap.c
Kconfig [PATCH] pi-futex: add plist implementation 2006-06-27 17:32:46 -07:00
Kconfig.debug [PATCH] lockdep: kconfig 2006-07-03 15:27:04 -07:00
kernel_lock.c [PATCH] lockdep: prove spinlock rwlock locking correctness 2006-07-03 15:27:04 -07:00
klist.c
kobject_uevent.c KEVENT: add new uevent for dock 2006-06-27 01:24:15 -04:00
kobject.c [PATCH] kobject: make people pay attention to kobject_add errors 2006-06-21 12:40:47 -07:00
kref.c
libcrc32c.c [PATCH] constify libcrc32c table 2006-06-25 10:01:09 -07:00
locking-selftest-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-mutex.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest.c [PATCH] lockdep: allow read_lock() recursion of same class 2006-07-03 15:27:04 -07:00
Makefile [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
parser.c
percpu_counter.c [PATCH] percpu counter data type changes to suppport more than 2**31 ext3 free blocks counter 2006-06-23 07:43:06 -07:00
plist.c [PATCH] pi-futex: add plist implementation 2006-06-27 17:32:46 -07:00
prio_tree.c
radix-tree.c [PATCH] radixtree: normalize radix_tree_tag_get() return value 2006-06-25 10:01:13 -07:00
rbtree.c [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency 2006-06-05 20:19:05 +01:00
rwsem-spinlock.c [PATCH] lockdep: prove rwsem locking correctness 2006-07-03 15:27:04 -07:00
rwsem.c [PATCH] lockdep: prove rwsem locking correctness 2006-07-03 15:27:04 -07:00
semaphore-sleepers.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sha1.c
smp_processor_id.c
sort.c
spinlock_debug.c [PATCH] lockdep: prove spinlock rwlock locking correctness 2006-07-03 15:27:04 -07:00
string.c [PATCH] strstrip() API 2006-06-23 07:43:06 -07:00
swiotlb.c
textsearch.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ts_bm.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ts_fsm.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ts_kmp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vsprintf.c Fix vsnprintf off-by-one bug 2006-06-28 17:09:34 -07:00