idr test suite: Take RCU read lock in idr_find_test_1
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 1 Apr 2021 11:44:48 +0000 (07:44 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 1 Apr 2021 11:44:48 +0000 (07:44 -0400)
commit703586410da69eb40062e64d413ca33bd735917a
tree1519f5488d549bdd0333767b243c31a48382165d
parent1bb4bd266cf39fd2fa711f2d265c558b92df1119
idr test suite: Take RCU read lock in idr_find_test_1

When run on a single CPU, this test would frequently access already-freed
memory.  Due to timing, this bug never showed up on multi-CPU tests.

Reported-by: Chris von Recklinghausen <crecklin@redhat.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
tools/testing/radix-tree/idr-test.c