linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pvcalls-front: Replace GFP_KERNEL with GFP_ATOMIC in create_active
@ 2019-01-14 15:48 wangbo
  2019-01-14 23:45 ` [Xen-devel] " Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: wangbo @ 2019-01-14 15:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: jgross, sstabellini, xen-devel, wang.bo116, wangbo

Create_active may called inside spinlock,replace GFP_KERNEL with GFP_ATOMIC

Signed-off-by: wangbo <wang.bo116@zte.com.cn>
---
 drivers/xen/pvcalls-front.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 77224d8..31bd3c9 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -344,11 +344,11 @@ static int create_active(struct sock_mapping *map, int *evtchn)
 	init_waitqueue_head(&map->active.inflight_conn_req);
 
 	map->active.ring = (struct pvcalls_data_intf *)
-		__get_free_page(GFP_KERNEL | __GFP_ZERO);
+		__get_free_page(GFP_ATOMIC | __GFP_ZERO);
 	if (map->active.ring == NULL)
 		goto out_error;
 	map->active.ring->ring_order = PVCALLS_RING_ORDER;
-	bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
+	bytes = (void *)__get_free_pages(GFP_ATOMIC | __GFP_ZERO,
 					PVCALLS_RING_ORDER);
 	if (bytes == NULL)
 		goto out_error;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Xen-devel] [PATCH] pvcalls-front: Replace GFP_KERNEL with GFP_ATOMIC in create_active
  2019-01-14 15:48 [PATCH] pvcalls-front: Replace GFP_KERNEL with GFP_ATOMIC in create_active wangbo
@ 2019-01-14 23:45 ` Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Ostrovsky @ 2019-01-14 23:45 UTC (permalink / raw)
  To: wangbo, linux-kernel; +Cc: jgross, xen-devel, wang.bo116, sstabellini

On 1/14/19 10:48 AM, wangbo wrote:
> Create_active may called inside spinlock,replace GFP_KERNEL with GFP_ATOMIC

https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git/commit/?h=for-linus-4.21&id=9f51c05dc41a6d69423e3d03d18eb7ab22f9ec19
is queued and addresses this problem.

(Please run scripts/get_maintainer.pl on your patches, otherwise they
may be missed and delayed)

-boris


>
> Signed-off-by: wangbo <wang.bo116@zte.com.cn>
> ---
>  drivers/xen/pvcalls-front.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
> index 77224d8..31bd3c9 100644
> --- a/drivers/xen/pvcalls-front.c
> +++ b/drivers/xen/pvcalls-front.c
> @@ -344,11 +344,11 @@ static int create_active(struct sock_mapping *map, int *evtchn)
>  	init_waitqueue_head(&map->active.inflight_conn_req);
>  
>  	map->active.ring = (struct pvcalls_data_intf *)
> -		__get_free_page(GFP_KERNEL | __GFP_ZERO);
> +		__get_free_page(GFP_ATOMIC | __GFP_ZERO);
>  	if (map->active.ring == NULL)
>  		goto out_error;
>  	map->active.ring->ring_order = PVCALLS_RING_ORDER;
> -	bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
> +	bytes = (void *)__get_free_pages(GFP_ATOMIC | __GFP_ZERO,
>  					PVCALLS_RING_ORDER);
>  	if (bytes == NULL)
>  		goto out_error;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-14 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 15:48 [PATCH] pvcalls-front: Replace GFP_KERNEL with GFP_ATOMIC in create_active wangbo
2019-01-14 23:45 ` [Xen-devel] " Boris Ostrovsky

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).