diff options
author | Matthew Wilcox <willy@infradead.org> | 2019-02-05 07:12:08 +0300 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2019-02-05 07:15:30 +0300 |
commit | bd54211b8e199ffb701ec98bf4f301e4a6f38a92 (patch) | |
tree | 15204320fbdc50172361d898e053f8341a8799ea /lib/test_xarray.c | |
parent | 8834f5600cf3c8db365e18a3d5cac2c2780c81e5 (diff) | |
download | linux-bd54211b8e199ffb701ec98bf4f301e4a6f38a92.tar.xz |
XArray tests: RCU lock prohibits GFP_KERNEL
Drop and reacquire the RCU read lock while using GFP_KERNEL.
Reported-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'lib/test_xarray.c')
-rw-r--r-- | lib/test_xarray.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/test_xarray.c b/lib/test_xarray.c index c596a957f764..671a93ee09e6 100644 --- a/lib/test_xarray.c +++ b/lib/test_xarray.c @@ -107,8 +107,11 @@ static noinline void check_xas_retry(struct xarray *xa) XA_BUG_ON(xa, xas.xa_node != XAS_RESTART); XA_BUG_ON(xa, xas_next_entry(&xas, ULONG_MAX) != xa_mk_value(0)); XA_BUG_ON(xa, xas.xa_node != NULL); + rcu_read_unlock(); XA_BUG_ON(xa, xa_store_index(xa, 1, GFP_KERNEL) != NULL); + + rcu_read_lock(); XA_BUG_ON(xa, !xa_is_internal(xas_reload(&xas))); xas.xa_node = XAS_RESTART; XA_BUG_ON(xa, xas_next_entry(&xas, ULONG_MAX) != xa_mk_value(0)); |