android_kernel_samsung_msm8976/include
Matthew Wilcox a202017766 radix-tree: fix race in gang lookup
commit 46437f9a554fbe3e110580ca08ab703b59f2f95a upstream.

If the indirect_ptr bit is set on a slot, that indicates we need to redo
the lookup.  Introduce a new function radix_tree_iter_retry() which
forces the loop to retry the lookup by setting 'slot' to NULL and
turning the iterator back to point at the problematic entry.

This is a pretty rare problem to hit at the moment; the lookup has to
race with a grow of the radix tree from a height of 0.  The consequences
of hitting this race are that gang lookup could return a pointer to a
radix_tree_node instead of a pointer to whatever the user had inserted
in the tree.

Fixes: cebbd29e1c ("radix-tree: rewrite gang lookup using iterator")
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 11:57:49 -08:00
..
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-08-03 09:29:46 -07:00
asm-generic nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:56:28 +02:00
clocksource
crypto crypto: af_alg - Disallow bind/setkey/... after accept(2) 2016-02-19 14:22:41 -08:00
drm drm/radeon: add new OLAND pci id 2015-09-13 09:07:59 -07:00
dt-bindings
keys
linux radix-tree: fix race in gang lookup 2016-02-25 11:57:49 -08:00
math-emu
media media: vb2: fix VBI/poll regression 2014-10-09 12:18:42 -07:00
memory
misc
net net: add validation for the socket syscall protocol argument 2016-01-22 19:47:55 -08:00
pcmcia
ras
rdma
rxrpc
scsi scsi: fix our current target reap infrastructure 2014-05-30 21:52:11 -07:00
sound ASoC: wm8904: Correct number of EQ registers 2015-11-09 10:12:58 -08:00
target target: Report correct response length for some commands 2014-06-30 20:09:45 -07:00
trace tracing: Fix syscall_*regfunc() vs copy_process() race 2014-07-06 18:54:16 -07:00
uapi USB: usbfs: allow URBs to be reaped after disconnection 2015-08-03 09:29:47 -07:00
video
xen x86/xen: Support kexec/kdump in HVM guests by doing a soft reset 2015-10-22 14:37:50 -07:00
Kbuild