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: Ian Campbell <Ian.Campbell@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v2 1/6] gnttab: eliminate several explicit version checks
Date: Mon, 15 Jun 2015 14:13:48 +0100	[thread overview]
Message-ID: <557ECF8C.70400@citrix.com> (raw)
In-Reply-To: <557EE0270200007800084CB4@mail.emea.novell.com>

On 15/06/15 13:24, Jan Beulich wrote:
> @@ -1977,10 +1969,6 @@ __acquire_grant_for_copy(
>  
>      read_lock(&rgt->lock);
>  
> -    if ( rgt->gt_version == 0 )
> -        PIN_FAIL(gt_unlock_out, GNTST_general_error,
> -                 "remote grant table not ready\n");
> -
>      if ( unlikely(gref >= nr_grant_entries(rgt)) )
>          PIN_FAIL(gt_unlock_out, GNTST_bad_gntref,
>                   "Bad grant reference %ld\n", gref);
> @@ -2482,19 +2470,15 @@ gnttab_set_version(XEN_GUEST_HANDLE_PARA
>         change the version number, except for the first 8 entries which
>         are allowed to be in use (xenstore/xenconsole keeps them mapped).
>         (You need to change the version number for e.g. kexec.) */
> -    if ( gt->gt_version != 0 )
> +    for ( i = GNTTAB_NR_RESERVED_ENTRIES; i < nr_grant_entries(gt); i++ )
>      {
> -        for ( i = GNTTAB_NR_RESERVED_ENTRIES; i < nr_grant_entries(gt); i++ )
> +        if ( read_atomic(&_active_entry(gt, i).pin) != 0 )
>          {
> -            if ( read_atomic(&_active_entry(gt, i).pin) != 0 )
> -            {
> -                gdprintk(XENLOG_WARNING,
> -                         "tried to change grant table version from %d to %d, but some grant entries still in use\n",
> -                         gt->gt_version,
> -                         op.version);
> -                res = -EBUSY;
> -                goto out_unlock;
> -            }
> +            gdprintk(XENLOG_WARNING,
> +                     "tried to change grant table version from %d to %d, but some grant entries still in use\n",
> +                     gt->gt_version, op.version);

As you are moving this printf, both %d should be %u.

As for the main part of the change, Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>

  reply	other threads:[~2015-06-15 13:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 12:14 [PATCH v2 0/6] gnttab: XSA-134 follow-up Jan Beulich
2015-06-15 12:24 ` [PATCH v2 1/6] gnttab: eliminate several explicit version checks Jan Beulich
2015-06-15 13:13   ` Andrew Cooper [this message]
2015-06-16  8:43   ` Ian Campbell
2015-06-15 12:26 ` [PATCH v2 2/6] gnttab: limit mapcount() looping Jan Beulich
2015-06-15 13:20   ` Andrew Cooper
2015-06-16  8:44   ` Ian Campbell
2015-06-15 12:26 ` [PATCH v2 3/6] gnttab: simplify shared entry v1 vs v2 handling Jan Beulich
2015-06-15 13:30   ` Andrew Cooper
2015-06-16  8:46   ` Ian Campbell
2015-06-15 12:27 ` [PATCH v2 4/6] gnttab: simplify page copying/clearing Jan Beulich
2015-06-15 13:34   ` Andrew Cooper
2015-06-16  8:49   ` Ian Campbell
2015-06-15 12:28 ` [PATCH v2 5/6] gnttab: fix/adjust gnttab_transfer() Jan Beulich
2015-06-15 13:37   ` Andrew Cooper
2015-06-16  8:52   ` Ian Campbell
2015-06-15 12:29 ` [PATCH v2 6/6] gnttab: make struct grant_mapping private Jan Beulich
2015-06-15 13:39   ` Andrew Cooper
2015-06-16  8:52   ` Ian Campbell

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=557ECF8C.70400@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.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.