remarkable-linux/include
Matthew Wilcox 46437f9a55 radix-tree: fix race in gang lookup
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-03 08:28:43 -08:00
..
acpi Merge branches 'acpica', 'acpi-video' and 'acpi-fan' 2016-01-21 00:41:59 +01:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2016-01-21 12:32:08 -08:00
clocksource arm64: KVM: Implement timer save/restore 2015-12-14 11:30:39 +00:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-22 11:58:43 -08:00
drm drm/atomic-helper: Export framebuffer_changed() 2016-01-20 08:55:43 +08:00
dt-bindings ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
keys Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next 2015-12-26 16:06:53 +11:00
kvm KVM: arm/arm64: vgic-v3: Make the LR indexing macro public 2015-12-14 11:30:38 +00:00
linux radix-tree: fix race in gang lookup 2016-02-03 08:28:43 -08:00
math-emu
media [media] media-entitiy: add a function to create multiple links 2016-01-11 12:19:26 -02:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-02-01 15:56:08 -08:00
pcmcia
ras
rdma IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers 2016-01-19 15:35:01 -05:00
rxrpc
scsi Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
soc ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
sound ALSA: timer: Introduce disconnect op to snd_timer_instance 2016-01-21 17:51:42 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2016-01-20 17:20:53 -08:00
trace This includes three minor fixes, mostly due to cut-and-paste issues. 2016-01-28 17:00:50 -08:00
uapi Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2016-02-01 15:21:20 -08:00
video omapdss: remove CONFIG_OMAP2_DSS_VENC from omapdss.h 2015-12-29 11:07:46 +02:00
xen Merge branch 'for-4.5/drivers' of git://git.kernel.dk/linux-block 2016-01-21 18:19:38 -08:00
Kbuild