linux-stable/tools
Matthew Wilcox (Oracle) cbc0285433 XArray: Do not return sibling entries from xa_load()
It is possible for xa_load() to observe a sibling entry pointing to
another sibling entry.  An example:

Thread A:		Thread B:
			xa_store_range(xa, entry, 188, 191, gfp);
xa_load(xa, 191);
entry = xa_entry(xa, node, 63);
[entry is a sibling of 188]
			xa_store_range(xa, entry, 184, 191, gfp);
if (xa_is_sibling(entry))
offset = xa_to_sibling(entry);
entry = xa_entry(xas->xa, node, offset);
[entry is now a sibling of 184]

It is sufficient to go around this loop until we hit a non-sibling entry.
Sibling entries always point earlier in the node, so we are guaranteed
to terminate this search.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Fixes: 6b24ca4a1a ("mm: Use multi-index entries in the page cache")
Cc: stable@vger.kernel.org
2023-07-28 15:37:45 -04:00
..
accounting
arch tools headers arm64: Sync arm64's cputype.h with the kernel sources 2023-07-14 10:36:16 -03:00
bootconfig
bpf tools/resolve_btfids: Fix setting HOSTCFLAGS 2023-06-05 15:44:47 -07:00
build perf build: Fix broken feature check for libtracefs due to external lib changes 2023-07-11 13:17:05 -03:00
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include tools include UAPI: Sync the sound/asound.h copy with the kernel sources 2023-07-14 10:33:50 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib libsubcmd: Avoid SEGV/use-after-free when commands aren't excluded 2023-07-11 16:44:12 -03:00
memory-model
mm
net/ynl tools: ynl-gen: fix parse multi-attr enum attribute 2023-07-26 13:38:23 -07:00
objtool objtool: initialize all of struct elf 2023-07-10 09:52:28 +02:00
pci
pcmcia
perf perf test task_exit: No need for a cycles event to check if we get an PERF_RECORD_EXIT 2023-07-17 10:27:44 -03:00
power platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00
rcu
scripts
spi spi: spidev_test Add three missing spi mode bits 2023-05-30 15:20:12 +01:00
testing XArray: Do not return sibling entries from xa_load() 2023-07-28 15:37:45 -04:00
thermal
time
tracing rtla/timerlat_hist: Add timerlat user-space support 2023-06-13 16:41:14 -04:00
usb usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1 2023-05-29 15:11:30 +01:00
verification
virtio tools/virtio: fix build break for aarch64 2023-06-27 10:47:08 -04:00
wmi
workqueue workqueue: Track and monitor per-workqueue CPU time usage 2023-05-17 17:02:09 -10:00
Makefile