Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] xarray: initialise the offset of a new root node
@ 2026-11-21 22:18 Andrew Morton
  2026-11-21 22:18 ` [PATCH v2 1/2] lib/test_xarray: check the offset of new root nodes Andrew Morton
  2026-11-21 22:18 ` [PATCH v2 2/2] xarray: initialise the offset of a new root node Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Morton @ 2026-11-21 22:18 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: linux-fsdevel, linux-mm, linux-kernel, Andrew Morton,
	Nickolai Zeldovich, Baoli Zhang, syzbot+73641b60a3bc11dfca8c,
	stable

An RCU XArray walker can read a stale root offset just before another
thread grows the tree and links that root beneath a new one.  The walker
can then return an entry with the wrong index or skip entries.  Check the
root offset after slab reuse and initialize it on allocation.

Nickolai Zeldovich (2):
  lib/test_xarray: check the offset of new root nodes
  xarray: initialise the offset of a new root node

 lib/test_xarray.c | 33 +++++++++++++++++++++++++++++++++
 lib/xarray.c      |  6 +++---
 2 files changed, 36 insertions(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-21 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 22:18 [PATCH v2 0/2] xarray: initialise the offset of a new root node Andrew Morton
2026-11-21 22:18 ` [PATCH v2 1/2] lib/test_xarray: check the offset of new root nodes Andrew Morton
2026-11-21 22:18 ` [PATCH v2 2/2] xarray: initialise the offset of a new root node Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox