From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Tim Deegan <tim@xen.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH v2 4/5] IOMMU/x86: correct page_list_first() use
Date: Mon, 2 Feb 2015 11:52:14 +0000 [thread overview]
Message-ID: <54CF64EE.6060602@citrix.com> (raw)
In-Reply-To: <54CF6B9F020000780005BDBD@mail.emea.novell.com>
On 02/02/15 11:20, Jan Beulich wrote:
> Comparing its result against NULL is unsafe when page lists use normal
> list entries for linking together - page_list_empty() needs to be used
> instead.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> --- a/xen/drivers/passthrough/x86/iommu.c
> +++ b/xen/drivers/passthrough/x86/iommu.c
> @@ -85,8 +85,9 @@ int arch_iommu_populate_page_table(struc
> * first few entries.
> */
> page_list_move(&d->page_list, &d->arch.relmem_list);
> - while ( (page = page_list_first(&d->page_list)) != NULL &&
> - (page->count_info & (PGC_state|PGC_broken)) )
> + while ( !page_list_empty(&d->page_list) &&
> + (page = page_list_first(&d->page_list),
> + (page->count_info & (PGC_state|PGC_broken))) )
> {
> page_list_del(page, &d->page_list);
> page_list_add_tail(page, &d->arch.relmem_list);
>
>
>
next prev parent reply other threads:[~2015-02-02 11:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 11:09 [PATCH v2 0/5] x86: shadow adjustments / allow for more memory to be used Jan Beulich
2015-02-02 11:18 ` [PATCH v2 1/5] x86/shadow: tidy up fragmentary page lists in multi‑page shadows Jan Beulich
2015-02-02 11:43 ` Andrew Cooper
2015-02-02 11:47 ` Jan Beulich
2015-02-02 11:55 ` [PATCH v2 1/5] x86/shadow: tidy up fragmentary page lists in multi?page shadows Tim Deegan
2015-02-02 11:19 ` [PATCH v2 2/5] x86/shadow: don't needlessly expose internal functions Jan Beulich
2015-02-02 11:47 ` Andrew Cooper
2015-02-02 11:20 ` [PATCH v2 3/5] x86/mm: allow for building without shadow mode support Jan Beulich
2015-02-02 11:56 ` Andrew Cooper
2015-02-02 11:20 ` [PATCH v2 4/5] IOMMU/x86: correct page_list_first() use Jan Beulich
2015-02-02 11:52 ` Andrew Cooper [this message]
2015-02-02 11:21 ` [PATCH v2 5/5] x86: provide build time option to support up to 123Tb of memory Jan Beulich
2015-02-02 11:58 ` Andrew Cooper
2015-02-02 13:03 ` Jan Beulich
2015-02-02 11:54 ` [PATCH v2 0/5] x86: shadow adjustments / allow for more memory to be used Tim Deegan
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=54CF64EE.6060602@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.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 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.