From: Juergen Gross <jgross@suse.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>, boris.ostrovsky@oracle.com
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: Fix two possible sleep-in-atomic-context bugs in create_active()
Date: Wed, 20 Jun 2018 08:52:17 +0200 [thread overview]
Message-ID: <c2f8d60a-58c5-9555-92f6-2a5ce2bd1e7e@suse.com> (raw)
In-Reply-To: <20180620023846.30618-1-baijiaju1990@gmail.com>
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@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
prev parent reply other threads:[~2018-06-20 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 2:38 Jia-Ju Bai
2018-06-20 6:52 ` Juergen Gross [this message]
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=c2f8d60a-58c5-9555-92f6-2a5ce2bd1e7e@suse.com \
--to=jgross@suse.com \
--cc=baijiaju1990@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®