diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-03-31 14:59:19 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-04-01 07:41:30 -0400 |
commit | 1bb4bd266cf39fd2fa711f2d265c558b92df1119 (patch) | |
tree | 9c38ae5cb23856d0efcef808ac667a41aedc14b5 /tools/testing/radix-tree/multiorder.c | |
parent | 7487de534dcbe143e6f41da751dd3ffcf93b00ee (diff) | |
download | lwn-1bb4bd266cf39fd2fa711f2d265c558b92df1119.tar.gz lwn-1bb4bd266cf39fd2fa711f2d265c558b92df1119.zip |
radix tree test suite: Register the main thread with the RCU library
Several test runners register individual worker threads with the
RCU library, but neglect to register the main thread, which can lead
to objects being freed while the main thread is in what appears to be
an RCU critical section.
Reported-by: Chris von Recklinghausen <crecklin@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'tools/testing/radix-tree/multiorder.c')
-rw-r--r-- | tools/testing/radix-tree/multiorder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/multiorder.c b/tools/testing/radix-tree/multiorder.c index 9eae0fb5a67d..e00520cc6349 100644 --- a/tools/testing/radix-tree/multiorder.c +++ b/tools/testing/radix-tree/multiorder.c @@ -224,7 +224,9 @@ void multiorder_checks(void) int __weak main(void) { + rcu_register_thread(); radix_tree_init(); multiorder_checks(); + rcu_unregister_thread(); return 0; } |