android_kernel_xiaomi_sm8350/lib
James Bottomley 34bb61f9dd [PATCH] fix klist semantics for lists which have elements removed on traversal
The problem is that klists claim to provide semantics for safe traversal of
lists which are being modified.  The failure case is when traversal of a
list causes element removal (a fairly common case).  The issue is that
although the list node is refcounted, if it is embedded in an object (which
is universally the case), then the object will be freed regardless of the
klist refcount leading to slab corruption because the klist iterator refers
to the prior element to get the next.

The solution is to make the klist take and release references to the
embedding object meaning that the embedding object won't be released until
the list relinquishes the reference to it.

(akpm: fast-track this because it's needed for the 2.6.13 scsi merge)

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 18:26:54 -07:00
..
reed_solomon
zlib_deflate
zlib_inflate Revert unnecessary zlib_inflate/inftrees.c fix 2005-08-17 13:07:28 -07:00
bitmap.c [PATCH] Use ALIGN to remove duplicate code 2005-06-25 16:25:02 -07:00
bust_spinlocks.c
cmdline.c
crc32.c [PATCH] crc32.c typo fix 2005-08-07 10:00:40 -07:00
crc32defs.h
crc-ccitt.c
ctype.c
dec_and_lock.c
div64.c
dump_stack.c
errno.c
extable.c
find_next_bit.c
gen_crc32table.c
genalloc.c [PATCH] ia64 uncached alloc 2005-06-21 18:46:18 -07:00
halfmd4.c
idr.c [PATCH] Document idr_get_new_above() semantics, update inotify 2005-08-26 11:32:57 -07:00
inflate.c [PATCH] Update in-kernel zlib routines 2005-08-05 16:23:21 -07:00
int_sqrt.c
iomap.c
Kconfig [LIB]: Make TEXTSEARCH_BM plain tristate like the others 2005-08-29 16:11:11 -07:00
Kconfig.debug [PATCH] detect soft lockups 2005-09-07 16:57:17 -07:00
kernel_lock.c
klist.c [PATCH] fix klist semantics for lists which have elements removed on traversal 2005-09-07 18:26:54 -07:00
kobject_uevent.c [NETLINK]: Add "groups" argument to netlink_kernel_create 2005-08-29 16:01:11 -07:00
kobject.c
kref.c
libcrc32c.c
Makefile [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
parser.c
prio_tree.c
radix-tree.c [PATCH] radix_tag_get(): differentiate between no present node and tag unset cases 2005-09-07 16:57:21 -07:00
rbtree.c
rwsem-spinlock.c
rwsem.c
semaphore-sleepers.c [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
sha1.c [PATCH] lib/sha1.c: fix sparse warning 2005-06-25 16:25:02 -07:00
smp_processor_id.c
sort.c
string.c
textsearch.c [LIB]: Textsearch infrastructure. 2005-06-23 20:49:30 -07:00
ts_bm.c [LIB]: Boyer-Moore extension for textsearch infrastructure strike #2 2005-08-29 16:11:06 -07:00
ts_fsm.c [LIB]: Naive finite state machine based textsearch 2005-06-23 20:59:16 -07:00
ts_kmp.c [LIB]: Knuth-Morris-Pratt textsearch algorithm 2005-06-23 20:58:37 -07:00
vsprintf.c [PATCH] %t... in vsnprintf 2005-08-23 18:43:46 -07:00