mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
Add a test case that races errseq_check_and_advance() on one CPU against errseq_set() of a different error on another CPU, then records the first error again and lets a second cursor consume it. The second -EIO is recorded after the first cursor's check returned, so that cursor's next check must report an error, whichever way the race with -ENOSPC went. Without the previous commit 1-6% of 2 million rounds lose the error on UML with 4 CPUs (seccomp=on ncpus=4); with it none do. The case is skipped on a single CPU and stops after 5 seconds. Signed-off-by: Shashank Mohan Jain <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Christian Brauner (Amutable) <[email protected]>