From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 2/9] xen/smp/spinlock: Fix leakage of the spinlock interrupt line for every CPU online/offline
Date: Fri, 26 Apr 2013 17:06:17 +0100 [thread overview]
Message-ID: <alpine.DEB.2.02.1304261706050.4180@kaball.uk.xensource.com> (raw)
In-Reply-To: <1366142947-18655-3-git-send-email-konrad.wilk@oracle.com>
On Tue, 16 Apr 2013, Konrad Rzeszutek Wilk wrote:
> While we don't use the spinlock interrupt line (see for details
> commit f10cd522c5fbfec9ae3cc01967868c9c2401ed23 -
> xen: disable PV spinlocks on HVM) - we should still do the proper
> init / deinit sequence. We did not do that correctly and for the
> CPU init for PVHVM guest we would allocate an interrupt line - but
> failed to deallocate the old interrupt line.
>
> This resulted in leakage of an irq_desc but more importantly this splat
> as we online an offlined CPU:
>
> genirq: Flags mismatch irq 71. 0002cc20 (spinlock1) vs. 0002cc20 (spinlock1)
> Pid: 2542, comm: init.late Not tainted 3.9.0-rc6upstream #1
> Call Trace:
> [<ffffffff811156de>] __setup_irq+0x23e/0x4a0
> [<ffffffff81194191>] ? kmem_cache_alloc_trace+0x221/0x250
> [<ffffffff811161bb>] request_threaded_irq+0xfb/0x160
> [<ffffffff8104c6f0>] ? xen_spin_trylock+0x20/0x20
> [<ffffffff813a8423>] bind_ipi_to_irqhandler+0xa3/0x160
> [<ffffffff81303758>] ? kasprintf+0x38/0x40
> [<ffffffff8104c6f0>] ? xen_spin_trylock+0x20/0x20
> [<ffffffff810cad35>] ? update_max_interval+0x15/0x40
> [<ffffffff816605db>] xen_init_lock_cpu+0x3c/0x78
> [<ffffffff81660029>] xen_hvm_cpu_notify+0x29/0x33
> [<ffffffff81676bdd>] notifier_call_chain+0x4d/0x70
> [<ffffffff810bb2a9>] __raw_notifier_call_chain+0x9/0x10
> [<ffffffff8109402b>] __cpu_notify+0x1b/0x30
> [<ffffffff8166834a>] _cpu_up+0xa0/0x14b
> [<ffffffff816684ce>] cpu_up+0xd9/0xec
> [<ffffffff8165f754>] store_online+0x94/0xd0
> [<ffffffff8141d15b>] dev_attr_store+0x1b/0x20
> [<ffffffff81218f44>] sysfs_write_file+0xf4/0x170
> [<ffffffff811a2864>] vfs_write+0xb4/0x130
> [<ffffffff811a302a>] sys_write+0x5a/0xa0
> [<ffffffff8167ada9>] system_call_fastpath+0x16/0x1b
> cpu 1 spinlock event irq -16
> smpboot: Booting Node 0 Processor 1 APIC 0x2
>
> And if one looks at the /proc/interrupts right after
> offlining (CPU1):
>
> 70: 0 0 xen-percpu-ipi spinlock0
> 71: 0 0 xen-percpu-ipi spinlock1
> 77: 0 0 xen-percpu-ipi spinlock2
>
> There is the oddity of the 'spinlock1' still being present.
>
> CC: stable@vger.kernel.org
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> arch/x86/xen/smp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index f80e69c..22c800a 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -662,6 +662,7 @@ static void xen_hvm_cpu_die(unsigned int cpu)
> unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
> unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu), NULL);
> unbind_from_irqhandler(per_cpu(xen_irq_work, cpu), NULL);
> + xen_uninit_lock_cpu(cpu);
> xen_teardown_timer(cpu);
> native_cpu_die(cpu);
> }
> --
> 1.8.1.4
>
next prev parent reply other threads:[~2013-04-26 16:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 20:08 [PATCH] fixes for v3.10 in the CPU hotplug patch (v1) Konrad Rzeszutek Wilk
2013-04-16 20:08 ` [PATCH 1/9] xen/smp: Fix leakage of timer interrupt line for every CPU online/offline Konrad Rzeszutek Wilk
2013-04-26 16:06 ` Stefano Stabellini
2013-04-16 20:09 ` [PATCH 2/9] xen/smp/spinlock: Fix leakage of the spinlock " Konrad Rzeszutek Wilk
2013-04-26 16:06 ` Stefano Stabellini [this message]
2013-04-16 20:09 ` [PATCH 3/9] xen/time: Fix kasprintf splat when allocating timer%d IRQ line Konrad Rzeszutek Wilk
2013-04-26 16:11 ` Stefano Stabellini
2013-04-29 18:36 ` Konrad Rzeszutek Wilk
2013-04-16 20:09 ` [PATCH 4/9] xen/events: Check that IRQ value passed in is valid Konrad Rzeszutek Wilk
2013-04-26 16:12 ` Stefano Stabellini
2013-04-16 20:09 ` [PATCH 5/9] xen/time: Add default value of -1 for IRQ and check for that Konrad Rzeszutek Wilk
2013-04-26 16:15 ` Stefano Stabellini
2013-04-16 20:09 ` [PATCH 6/9] xen/spinlock: Check against default value of -1 for IRQ line Konrad Rzeszutek Wilk
2013-04-26 16:18 ` Stefano Stabellini
2013-04-29 18:35 ` Konrad Rzeszutek Wilk
2013-04-16 20:09 ` [PATCH 7/9] xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM Konrad Rzeszutek Wilk
2013-04-26 16:20 ` Stefano Stabellini
2013-04-29 18:34 ` Konrad Rzeszutek Wilk
2013-04-16 20:09 ` [PATCH 8/9] xen/smp/pvhvm: Don't initialize IRQ_WORKER as we are using the native one Konrad Rzeszutek Wilk
2013-04-26 16:27 ` Stefano Stabellini
2013-04-29 18:34 ` Konrad Rzeszutek Wilk
2013-05-01 13:25 ` Stefano Stabellini
2013-05-01 14:57 ` Konrad Rzeszutek Wilk
2013-05-01 15:07 ` Stefano Stabellini
2013-04-16 20:09 ` [PATCH 9/9] xen/smp: Unifiy some of the PVs and PVHVM offline CPU path 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=alpine.DEB.2.02.1304261706050.4180@kaball.uk.xensource.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xen-devel@lists.xensource.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
all inboxes | Powered by JetHome®