From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Ian Jackson <Ian.Jackson@eu.citrix.com>,
Julien Grall <julien.grall@arm.com>
Subject: Re: [PATCH v2 2/2] make domain_adjust_tot_pages() __must_check
Date: Wed, 5 Dec 2018 20:08:45 +0000 [thread overview]
Message-ID: <23229f63-1642-c32d-a0f3-b9659cd1352e@citrix.com> (raw)
In-Reply-To: <5C07FA14020000780020336D@prv1-mh.provo.novell.com>
On 05/12/2018 16:17, Jan Beulich wrote:
> Even if unlikely, donate_page() should not ignore the possible need to
> obtain a domain reference. To make people look more closely when they
> add new uses of domain_adjust_tot_pages(), force its return value to be
> checked. This in turn requires a benign change to assign_pages().
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
This is very weird code to read. It is a side effect of the ABI, and it
appears we do have this style used elsewhere.
Therefore, Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
However, I think this would be improved if we had helpers along the
lines of "bool domain_{add,remove}_pages()" where the boolean return
indicated whether you needed to play with the domain reference count.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-12-05 20:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 16:12 [PATCH 0/4] XSA-276 follow-up Jan Beulich
2018-11-20 16:17 ` [PATCH 1/4] mm: disallow MEMF_no_refcount to be passed for domain-owned allocations Jan Beulich
2018-11-20 16:35 ` Andrew Cooper
2018-11-23 9:45 ` [PATCH v2] " Jan Beulich
2018-11-23 10:28 ` Andrew Cooper
2018-11-23 10:49 ` Jan Beulich
2018-11-23 10:50 ` Andrew Cooper
2018-11-20 16:18 ` [PATCH 2/4] x86: correct instances of PGC_allocated clearing Jan Beulich
2018-11-20 16:59 ` Andrew Cooper
2018-11-20 17:12 ` Jan Beulich
2018-11-21 2:47 ` Tamas K Lengyel
2018-11-20 16:19 ` [PATCH 3/4] x86: reduce code duplication in guest_remove_page() Jan Beulich
2018-11-20 17:06 ` Andrew Cooper
2018-11-21 9:28 ` Jan Beulich
2018-11-20 16:19 ` [PATCH 4/4] make domain_adjust_tot_pages() __must_check Jan Beulich
2018-12-05 16:14 ` [PATCH v2 0/2] remaining XSA-276 follow-up Jan Beulich
2018-12-05 16:17 ` [PATCH v2 1/2] x86: reduce code duplication in guest_remove_page() Jan Beulich
2018-12-05 20:03 ` Andrew Cooper
2018-12-05 16:17 ` [PATCH v2 2/2] make domain_adjust_tot_pages() __must_check Jan Beulich
2018-12-05 20:08 ` Andrew Cooper [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=23229f63-1642-c32d-a0f3-b9659cd1352e@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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;
as well as URLs for NNTP newsgroup(s).