mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
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>
This commit is contained in:
parent
8834f5600c
commit
bd54211b8e
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user