xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Chong Li <lichong659@gmail.com>, xen-devel@lists.xen.org
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
	george.dunlap@eu.citrix.com, dario.faggioli@citrix.com,
	Meng Xu <mengxu@cis.upenn.edu>,
	jbeulich@suse.com, dgolomb@seas.upenn.edu
Subject: Re: [PATCH] xen: enable per-VCPU parameter for RTDS
Date: Tue, 5 Apr 2016 00:14:09 +0100	[thread overview]
Message-ID: <5702F541.9000809@citrix.com> (raw)
In-Reply-To: <1459809913-1958-1-git-send-email-lichong659@gmail.com>

On 04/04/2016 23:45, Chong Li wrote:
> From: Chong-Li <lichong659@gmail.com>
>
> Commit f7b87b0745b4 ("enable per-VCPU parameter for RTDS") introduced
> a bug: it made it possible, in Credit and Credit2, when doing domain 
> or vcpu parameters' manipulation, to leave the hypervisor with a 
> spinlock held.

And interrupts disabled (which is far more of a problem than just the
spinlock).

>
> Fix it.
>
> Signed-off-by: Chong Li <chong.li@wustl.edu>
> Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
> Signed-off-by: Sisu Xi <xisisu@gmail.com>

This patch is not SoB by anyone other than you.

>
> Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
>
> ---
> CC: <dario.faggioli@citrix.com>
> CC: <george.dunlap@eu.citrix.com>
> CC: <dgolomb@seas.upenn.edu>
> CC: <mengxu@cis.upenn.edu>
> CC: <jbeulich@suse.com>
> CC: <lichong659@gmail.com>
> ---
>  xen/common/sched_credit.c  | 1 +
>  xen/common/sched_credit2.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
> index e5d15d8..fa6b7f0 100644
> --- a/xen/common/sched_credit.c
> +++ b/xen/common/sched_credit.c
> @@ -1101,6 +1101,7 @@ csched_dom_cntl(
>              sdom->cap = op->u.credit.cap;
>          break;
>      default:
> +        spin_unlock_irqrestore(&prv->lock, flags);
>          return -EINVAL;
>      }
>  

While Dario didn't care too much how you fixed the issue, I do.

Please use an "int rc = 0" and remove remove the return statement
(instead, assigning rc = -EINVAL; and a break;).  It makes far more
readable and understandable code, which is better in the long run.

~Andrew

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

  reply	other threads:[~2016-04-04 23:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 22:45 [PATCH] xen: enable per-VCPU parameter for RTDS Chong Li
2016-04-04 23:14 ` Andrew Cooper [this message]
2016-04-05  9:18   ` George Dunlap
2016-04-05  9:39     ` Dario Faggioli
  -- strict thread matches above, loose matches on Subject: below --
2016-04-05  1:07 Chong Li
2016-04-05  1:44 ` Meng Xu
2016-04-05  7:57 ` Jan Beulich
2016-04-05  9:25   ` George Dunlap
2016-04-05  9:43     ` Dario Faggioli
2016-04-05 12:45 ` Wei Liu
2016-04-04 21:21 Chong Li
2016-04-04 22:05 ` Dario Faggioli

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=5702F541.9000809@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=chong.li@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=lichong659@gmail.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@gmail.com \
    /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).