Skip to content

lib/find: Fix KCSAN warnings in find_*_bit() functions

Jan Kara linux-fsdevel lkml oe-kbuild-all oe-lkp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib/find: Make functions safe on changing bitmapsinclude/linux/find.h lib/find_bit.c+47 -3214 replies
2/2xarray: Fix race in xas_find_chunk()include/linux/xarray.h+0 -92 replies

Reviews trailers per patch

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

PatchMatthew Wilcox (Oracle)Mirsad Todorovac
1/2T-b
2/2R-b T-b

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] lib/find: Fix KCSAN warnings in find_*_bit() functions

Hello,

KCSAN issues a lot of warnings for various find_*_bit() functions. This is because some users (such as xarray) use these functions without protection from concurrent modifications (e.g. xarray tag searching is protected only by RCU) and find_*_bit() implementations are indeed prone to refetching values from memory with undefined results. This series fixes these problems. See patch 1 for more details.

Mirsad, can you give these patches testing on your setup? Thanks!

Honza