All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Wen Yang <wen.yang99@zte.com.cn>,
	boris.ostrovsky@oracle.com, sstabellini@kernel.org
Cc: xen-devel@lists.xenproject.org, zhong.weidong@zte.com.cn,
	linux-kernel@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] pvcalls-front: Use GFP_ATOMIC under spin_lock
Date: Thu, 29 Nov 2018 18:01:46 +0100	[thread overview]
Message-ID: <074547f7-6a9c-6bef-30e7-0f69e66b912a__36581.3158489347$1543510831$gmane$org@suse.com> (raw)
In-Reply-To: <20181129120101.19678-1-wen.yang99@zte.com.cn>

On 29/11/2018 13:01, Wen Yang wrote:
> The problem is that we call this with a spin lock held.
> The call tree is:
> pvcalls_front_accept() holds bedata->socket_lock.
>     -> create_active()
>         -> __get_free_pages() uses GFP_KERNEL
> 
> The create_active() function is only called from pvcalls_front_accept()
> with a spin_lock held, The allocation is not allowed to sleep and
> GFP_KERNEL is not sufficient, it has to be ATOMIC.

I'd rather have a function doing the allocations which is called
outside the lock and either passing the allocated data to
create_active() or hook it into map in the allocation function.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-11-29 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 12:01 [PATCH] pvcalls-front: Use GFP_ATOMIC under spin_lock Wen Yang
2018-11-29 17:01 ` Juergen Gross
2018-11-30  1:40   ` wen.yang99
2018-11-29 17:01 ` Juergen Gross [this message]
2018-11-29 12:01 Wen Yang

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='074547f7-6a9c-6bef-30e7-0f69e66b912a__36581.3158489347$1543510831$gmane$org@suse.com' \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=wen.yang99@zte.com.cn \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zhong.weidong@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.