lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8abb850a03a3a8b11a0e92949e5b99d9cc178e35@git.kernel.org>
Date:	Tue, 20 Jan 2015 02:50:02 -0800
From:	tip-bot for Jiang Liu <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	bhelgaas@...gle.com, tglx@...utronix.de, tony.luck@...el.com,
	lv.zheng@...el.com, linux@...elenboom.it, hpa@...or.com,
	linux-kernel@...r.kernel.org, david.vrabel@...rix.com,
	konrad.wilk@...cle.com, mingo@...nel.org,
	jiang.liu@...ux.intel.com, graeme.gregory@...aro.org
Subject: [tip:x86/urgent] x86/xen:
  Override ACPI IRQ management callback __acpi_unregister_gsi

Commit-ID:  8abb850a03a3a8b11a0e92949e5b99d9cc178e35
Gitweb:     http://git.kernel.org/tip/8abb850a03a3a8b11a0e92949e5b99d9cc178e35
Author:     Jiang Liu <jiang.liu@...ux.intel.com>
AuthorDate: Tue, 20 Jan 2015 10:21:07 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 20 Jan 2015 11:44:41 +0100

x86/xen: Override ACPI IRQ management callback __acpi_unregister_gsi

Xen overrides __acpi_register_gsi and leaves __acpi_unregister_gsi as is.
That means, an IRQ allocated by acpi_register_gsi_xen_hvm() or
acpi_register_gsi_xen() will be freed by acpi_unregister_gsi_ioapic(),
which may cause undesired effects. So override __acpi_unregister_gsi to
NULL for safety.

Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
Tested-by: Sander Eikelenboom <linux@...elenboom.it>
Cc: Tony Luck <tony.luck@...el.com>
Cc: xen-devel@...ts.xenproject.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: David Vrabel <david.vrabel@...rix.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Graeme Gregory <graeme.gregory@...aro.org>
Cc: Lv Zheng <lv.zheng@...el.com>
Link: http://lkml.kernel.org/r/1421720467-7709-4-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 arch/x86/include/asm/acpi.h | 1 +
 arch/x86/pci/xen.c          | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 0ab4f9f..3a45668 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -50,6 +50,7 @@ void acpi_pic_sci_set_trigger(unsigned int, u16);
 
 extern int (*__acpi_register_gsi)(struct device *dev, u32 gsi,
 				  int trigger, int polarity);
+extern void (*__acpi_unregister_gsi)(u32 gsi);
 
 static inline void disable_acpi(void)
 {
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 6e5e89c..9098d88 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -458,6 +458,7 @@ int __init pci_xen_hvm_init(void)
 	 * just how GSIs get registered.
 	 */
 	__acpi_register_gsi = acpi_register_gsi_xen_hvm;
+	__acpi_unregister_gsi = NULL;
 #endif
 
 #ifdef CONFIG_PCI_MSI
@@ -482,6 +483,7 @@ int __init pci_xen_initial_domain(void)
 	pci_msi_ignore_mask = 1;
 #endif
 	__acpi_register_gsi = acpi_register_gsi_xen;
+	__acpi_unregister_gsi = NULL;
 	/* Pre-allocate legacy irqs */
 	for (irq = 0; irq < nr_legacy_irqs(); irq++) {
 		int trigger, polarity;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ