lkml.org 
[lkml]   [2019]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject答复: [PATCH] XArray tests: allocation has to be GFP ATOMIC under rcu read lock
Date


> -----邮件原件-----
> 发件人: Matthew Wilcox [mailto:willy@infradead.org]
> 发送时间: 2019年2月3日 7:20
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: linux-kernel@vger.kernel.org
> 主题: Re: [PATCH] XArray tests: allocation has to be GFP_ATOMIC under
> rcu_read_lock
>
> On Tue, Jan 29, 2019 at 07:08:42PM +0800, Li RongQing wrote:
> > - XA_BUG_ON(xa, xa_store_index(xa, 1, GFP_KERNEL) != NULL);
> > + XA_BUG_ON(xa, xa_store_index(xa, 1, GFP_ATOMIC) != NULL);
>
> Did you try running this change in userspace too? I don't think it'll work.
>
> I think the right change would be:
>

Could you send this patch?

Thanks

-Li RongQing


> +++ 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));

\
 
 \ /
  Last update: 2019-02-11 05:12    [W:0.079 / U:5.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site