[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c2f8d60a-58c5-9555-92f6-2a5ce2bd1e7e@suse.com>
Date: Wed, 20 Jun 2018 08:52:17 +0200
From: Juergen Gross <jgross@...e.com>
To: Jia-Ju Bai <baijiaju1990@...il.com>, boris.ostrovsky@...cle.com
Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xen: Fix two possible sleep-in-atomic-context bugs in
create_active()
On 20/06/18 04:38, Jia-Ju Bai wrote:
> The driver may sleep with holding a spinlock.
> The function call paths (from bottom to top) in Linux-4.16.7 are:
>
> [FUNC] __get_free_pages(GFP_KERNEL)
> drivers/xen/pvcalls-front.c, 351: __get_free_pages in create_active
> drivers/xen/pvcalls-front.c, 800: create_active in pvcalls_front_accept
> drivers/xen/pvcalls-front.c, 783: spin_lock in pvcalls_front_accept
>
> [FUNC] __get_free_pages(GFP_KERNEL)
> drivers/xen/pvcalls-front.c, 347: __get_free_pages in create_active
> drivers/xen/pvcalls-front.c, 800: create_active in pvcalls_front_accept
> drivers/xen/pvcalls-front.c, 783: spin_lock in pvcalls_front_accept
>
> To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC.
>
> These bugs are found by my static analysis tool (DSAC-2) and checked by my
> code review.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
Reviewed-by: Juergen Gross <jgross@...e.com>
Juergen
Powered by blists - more mailing lists