aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.ibm.com>2019-03-21 13:30:01 -0700
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-03-26 14:42:53 -0700
commita9d6938ddb7f892552013b93e4842fc1a538628d (patch)
tree2dfa7b4ce50c1c1e8c8622802999c32e22d513c7 /tools/testing/selftests/rcutorture
parentrcuperf: Fix cleanup path for invalid perf_type strings (diff)
downloadlinux-dev-a9d6938ddb7f892552013b93e4842fc1a538628d.tar.xz
linux-dev-a9d6938ddb7f892552013b93e4842fc1a538628d.zip
locktorture: NULL cxt.lwsa and cxt.lrsa to allow bad-arg detection
Currently, lock_torture_cleanup() uses the values of cxt.lwsa and cxt.lrsa to detect bad parameters that prevented locktorture from initializing, let alone running. In this case, lock_torture_cleanup() does no cleanup aside from invoking torture_cleanup_begin() and torture_cleanup_end(), as required to permit future torture tests to run. However, this heuristic fails if the run with bad parameters was preceded by a previous run that actually ran: In this case, both cxt.lwsa and cxt.lrsa will remain non-zero, which means that the current lock_torture_cleanup() invocation will be unable to detect the fact that it should skip cleanup, which can result in charming outcomes such as double frees. This commit therefore NULLs out both cxt.lwsa and cxt.lrsa at the end of any run that actually ran. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture')
0 files changed, 0 insertions, 0 deletions