All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v3 1/2] gnttab: don't use possibly unbounded tail calls
Date: Tue, 15 Aug 2017 16:04:17 +0100	[thread overview]
Message-ID: <ca57aff7-10ad-09db-45a1-c0fc25b3f14a@citrix.com> (raw)
In-Reply-To: <599317F3020000780016FDED@prv-mh.provo.novell.com>

On 15/08/17 14:49, Jan Beulich wrote:
> @@ -2608,7 +2610,7 @@ static long gnttab_copy(
>      {
>          if ( i && hypercall_preempt_check() )
>          {
> -            rc = i;
> +            rc = count - i;

Somewhere, probably as a comment for gnttab_copy(), we should have a
comment explaining why the return value is different from all other ops,
which will also go somewhat to explaining the "rc = count - rc;" logic.

I think it would also be wise to have an early exit in
do_grant_table_op() for passing a count of 0.  As far as I can tell, we
will get all the way into the subop handler before discovering a count of 0.

Otherwise, LGTM.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-08-15 15:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 13:43 [PATCH v3 0/2] XSA-226 Jan Beulich
2017-08-15 13:49 ` [PATCH v3 1/2] gnttab: don't use possibly unbounded tail calls Jan Beulich
2017-08-15 15:04   ` Andrew Cooper [this message]
2017-08-16  9:52     ` Jan Beulich
2017-08-16 10:01       ` Andrew Cooper
2017-08-16 10:13         ` Jan Beulich
2017-08-15 13:49 ` [PATCH v3 2/2] gnttab: fix transitive grant handling Jan Beulich
2017-08-15 15:58   ` Andrew Cooper
2017-08-15 14:08 ` [PATCH v3 0/2] XSA-226 Steven Haigh
2017-08-15 14:35   ` Jan Beulich

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=ca57aff7-10ad-09db-45a1-c0fc25b3f14a@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.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 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.