lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] pvcalls-front: Avoid __get_free_pages(GFP_KERNEL) under spinlock
From
Date
On 30/11/2018 12: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.
>
> This issue was detected by using the Coccinelle software.
>
> v2: Add a function doing the allocations which is called
> outside the lock and passing the allocated data to
> create_active().
> v3: Use the matching deallocators i.e., free_page()
> and free_pages(), respectively.
>
> Suggested-by: Juergen Gross <jgross@suse.com>
> Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
> CC: Julia Lawall <julia.lawall@lip6.fr>
> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> CC: Juergen Gross <jgross@suse.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: xen-devel@lists.xenproject.org
> CC: linux-kernel@vger.kernel.org
> ---

This patch is malformed. Please send it via an appropriate tool/mailer.

See e.g. Documentation/process/submitting-patches.rst or
Documentation/process/email-clients.rst in the Linux kernel source tree.


Juergen

\
 
 \ /
  Last update: 2018-11-30 15:14    [W:0.044 / U:7.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site