Skip to content

xarray: free unused spare node after range creation

Andrew Morton linux-mm sashiko-reviews 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib: xarray: free unused spare node in xas_create_range()lib/xarray.c+6 -11 reply
2/2lib/test_xarray: check unused spare node after range creationlib/test_xarray.c+31 -00 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDavid Hildenbrand (ARM)Andrew Morton
1/2R-b T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] xarray: free unused spare node after range creation

xas_nomem() can leave a spare xa_node in an XA state when another user populates the tree before xas_create_range() retries. Free an unused spare at the end of range creation, and add a deterministic lib/test_xarray check for that path. The fix is first and the test is second.

The test patch was held on both sides of a kernel A/B run while only the fix was removed and restored. Without the fix, its spare-node assertion failed (158825705 of 158825706 checks passed). With the fix, all 158825706 checks passed. Both runs used the same verified guest test script.

Shardul Bankar (1):
lib: xarray: free unused spare node in xas_create_range()

Andrew Morton (1):
lib/test_xarray: check unused spare node after range creation

 lib/test_xarray.c | 31 +++++++++++++++++++++++++++++++
 lib/xarray.c      |  7 ++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)