linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 答复: [PATCH] XArray tests: allocation has to be GFP_ATOMIC under rcu_read_lock
Date: Mon, 11 Feb 2019 03:55:53 +0000	[thread overview]
Message-ID: <0626e4dd96a345b6bf5b12c7e7b1319d@baidu.com> (raw)
In-Reply-To: <20190202231944.GB13285@bombadil.infradead.org>



> -----邮件原件-----
> 发件人: 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));


  reply	other threads:[~2019-02-11  4:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 11:08 [PATCH] XArray tests: allocation has to be GFP_ATOMIC under rcu_read_lock Li RongQing
2019-02-02 23:19 ` Matthew Wilcox
2019-02-11  3:55   ` Li,Rongqing [this message]
2019-02-11  4:19     ` 答复: " Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0626e4dd96a345b6bf5b12c7e7b1319d@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).