• T
    genirq/msi: Handle reactivation only on success · da5dd9e8
    Thomas Gleixner 提交于
    When analyzing the fallout of the x86 vector allocation rework it turned
    out that the error handling in msi_domain_alloc_irqs() is broken.
    
    If MSI_FLAG_MUST_REACTIVATE is set for a MSI domain then it clears the
    activation flag for a successfully initialized msi descriptor. If a
    subsequent initialization fails then the error handling code path does not
    deactivate the interrupt because the activation flag got cleared.
    
    Move the clearing of the activation flag outside of the initialization loop
    so that an eventual failure can be cleaned up correctly.
    
    Fixes: 22d0b12f ("genirq/irqdomain: Add force reactivation flag to irq domains")
    Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
    Tested-by: NAlexandru Chirvasitu <achirvasub@gmail.com>
    Tested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
    Cc: Pavel Machek <pavel@ucw.cz>
    Cc: Maciej W. Rozycki <macro@linux-mips.org>
    Cc: Mikael Pettersson <mikpelinux@gmail.com>
    Cc: Josh Poulson <jopoulso@microsoft.com>
    Cc: Mihai Costache <v-micos@microsoft.com>
    Cc: Stephen Hemminger <sthemmin@microsoft.com>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Cc: linux-pci@vger.kernel.org
    Cc: Haiyang Zhang <haiyangz@microsoft.com>
    Cc: Dexuan Cui <decui@microsoft.com>
    Cc: Simon Xiao <sixiao@microsoft.com>
    Cc: Saeed Mahameed <saeedm@mellanox.com>
    Cc: Jork Loeser <Jork.Loeser@microsoft.com>
    Cc: Bjorn Helgaas <bhelgaas@google.com>
    Cc: devel@linuxdriverproject.org
    Cc: KY Srinivasan <kys@microsoft.com>
    Cc: Alan Cox <alan@linux.intel.com>
    Cc: Sakari Ailus <sakari.ailus@intel.com>,
    Cc: linux-media@vger.kernel.org
    
    da5dd9e8
msi.c 12.0 KB