All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Aaron Cornelius <aaron.cornelius@dornerworks.com>
Subject: Re: [PATCH] xen: sched: fix spinlock issue in schedule_cpu_switch().
Date: Mon, 11 Apr 2016 17:38:03 +0100	[thread overview]
Message-ID: <570BD2EB.4020108@citrix.com> (raw)
In-Reply-To: <20160411162701.19274.72053.stgit@Solace.fritz.box>

On 11/04/16 17:27, Dario Faggioli wrote:
> Commit 94734ab7c3f5 ("xen: sched: close potential races
> when switching scheduler to CPUs") buggily replaced a call
> to pcpu_schedule_lock_irq() with just pcpu_schedule_lock(),
> causing the relevant irq_safe vs. non-irq_safe ASSERT()
> in check_lock() to trigger.
> 
> Fix that.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

> ---
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Aaron Cornelius <aaron.cornelius@dornerworks.com>
> ---
>  xen/common/schedule.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index 922b035..013e5f1 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -1702,7 +1702,7 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c)
>       * that the lock itself changed, and retry acquiring the new one (which
>       * will be the correct, remapped one, at that point).
>       */
> -    old_lock = pcpu_schedule_lock(cpu);
> +    old_lock = pcpu_schedule_lock_irq(cpu);
>  
>      vpriv_old = idle->sched_priv;
>      ppriv_old = per_cpu(schedule_data, cpu).sched_priv;
> 


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

  reply	other threads:[~2016-04-11 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 16:27 [PATCH] xen: sched: fix spinlock issue in schedule_cpu_switch() Dario Faggioli
2016-04-11 16:38 ` George Dunlap [this message]
2016-04-11 16:59   ` Dario Faggioli
2016-04-11 17:09     ` Konrad Rzeszutek Wilk

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=570BD2EB.4020108@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=aaron.cornelius@dornerworks.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@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.