summaryrefslogtreecommitdiff
tag namefix-percpu-lists-6.6_2023-09-12 (8ac2867be636e4edd46b78dc97f4ad9ee8caa540)
tag date2023-09-12 10:34:49 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit ef7d959339...
xfs: fix cpu hotplug mess [v2]
Ritesh and Eric separately reported crashes in XFS's hook function for CPU hot remove if the remove event races with a filesystem being mounted. I also noticed via generic/650 that once in a while the log will shut down over an apparent overrun of a transaction reservation; this turned out to be due to CIL percpu list aggregation failing to pick up the percpu list items from a dying CPU. Either way, the solution here is to eliminate the need for a CPU dying hook by using a private cpumask to track which CPUs have added to their percpu lists directly, and iterating with that mask. This fixes the log problems and (I think) solves a theoretical UAF bug in the inodegc code too. v2: fix a few put_cpu uses, add necessary memory barriers, and use atomic cpumask operations This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZQChOQAKCRBKO3ySh0YR plauAQCV0RymbwD/ONbvpor3yK4R3YO1pa923KtoiQ9IAV5uswD/YBWvyI76BhNs B8hwbEDm3X2ZjQaikxI+Xx2cMaAhkgY= =EJ0b -----END PGP SIGNATURE-----