summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-12-17 23:37:25 +0100
committerMatthew Wilcox <willy@infradead.org>2019-01-07 03:24:43 +0100
commit490fd30f859572ac97a51faa31860869744ba97b (patch)
treef950c9d1a195c64587d39b86af871d2fdef59bc2 /lib
parentarch: restore generic-y += shmparam.h for some architectures (diff)
downloadlinux-490fd30f859572ac97a51faa31860869744ba97b.tar.xz
linux-490fd30f859572ac97a51faa31860869744ba97b.zip
XArray tests: Add RCU locking
0day picked up that I'd forgotten to add locking to this new test. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_xarray.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/test_xarray.c b/lib/test_xarray.c
index 4676c0a1eeca..a885afde0aef 100644
--- a/lib/test_xarray.c
+++ b/lib/test_xarray.c
@@ -839,6 +839,7 @@ static noinline void check_find_3(struct xarray *xa)
for (i = 0; i < 100; i++) {
for (j = 0; j < 100; j++) {
+ rcu_read_lock();
for (k = 0; k < 100; k++) {
xas_set(&xas, j);
xas_for_each_marked(&xas, entry, k, XA_MARK_0)
@@ -847,6 +848,7 @@ static noinline void check_find_3(struct xarray *xa)
XA_BUG_ON(xa,
xas.xa_node != XAS_RESTART);
}
+ rcu_read_unlock();
}
xa_store_index(xa, i, GFP_KERNEL);
xa_set_mark(xa, i, XA_MARK_0);