mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
Two fixes in the core interrupt code which ensure that all error exits
unlock the descriptor lock. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl82rV8THHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoThVD/4qyaXGvSg02j08IMArce2arTsBaCNN tD+2iCmm8Ku74p3EZRjji9FyN7M/MKcTVkrcRFM+4YKTFnbgMYpnydOxbtsKren/ vimjtGWyfVjh7mzBt4lB53d/10NAmJRYQl1gJiYaEgmTdvhZ/gLygL1pHwc9eBHr hrn2WvAZ1aS9dMNuN8MnszObJphvh4z42fLYenHDxQqiAnEKTrhGvhfRuNowjjyP GHoUhXxMvVxN0DOE21EPGV6ezgssicucyymQmKEDW97tcLEvkVJuUuTfAiXuEPvg T94FIg1RU01AuwQPBmuoFX7RumYNf/XRhoQu1p9wNU7pFJh3eY4yHp8jXx24U2tm OY66wJfsuQ3BLPaxB9RuyV4Bs8QWinTzM+VZiTwkBPx5/zhtp5LU/uKq8+NcMv3Z 72f1tJeXi8FwlB1ALRjNdKth4hkB/mL9aHPMXQqSRTb5LcWSXbZ+MBnUxzPnjlSy u4EK7V2m8GHX2lQ/RA+QC3u3Vv1lY/dmjdyIXLLFv7IkweJXW1yj6hotIBNVyHXt nG/0ccKlU7KvmI5pnzqrclSwRaKOsrwRPfsujHgAo3Dc+FTxSDXz2lUQK+Oqla9n cd6yKOvwjOk2SeETlM5l3Tr8X1b30AgaE2IjtSqt3xNWReWXrA0tBHrDWyMBBOBI +Vd9rsaGq1hfbQ== =/wh/ -----END PGP SIGNATURE----- Merge tag 'irq-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two fixes in the core interrupt code which ensure that all error exits unlock the descriptor lock" * tag 'irq-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Unlock irq descriptor after errors genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq()
This commit is contained in:
commit
1d229a65b4
@ -2731,8 +2731,10 @@ int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
|
||||
|
||||
do {
|
||||
chip = irq_data_get_irq_chip(data);
|
||||
if (WARN_ON_ONCE(!chip))
|
||||
return -ENODEV;
|
||||
if (WARN_ON_ONCE(!chip)) {
|
||||
err = -ENODEV;
|
||||
goto out_unlock;
|
||||
}
|
||||
if (chip->irq_set_irqchip_state)
|
||||
break;
|
||||
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
|
||||
@ -2745,6 +2747,7 @@ int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
|
||||
if (data)
|
||||
err = chip->irq_set_irqchip_state(data, which, val);
|
||||
|
||||
out_unlock:
|
||||
irq_put_desc_busunlock(desc, flags);
|
||||
return err;
|
||||
}
|
||||
|
@ -185,14 +185,18 @@ void rearm_wake_irq(unsigned int irq)
|
||||
unsigned long flags;
|
||||
struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
|
||||
|
||||
if (!desc || !(desc->istate & IRQS_SUSPENDED) ||
|
||||
!irqd_is_wakeup_set(&desc->irq_data))
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
if (!(desc->istate & IRQS_SUSPENDED) ||
|
||||
!irqd_is_wakeup_set(&desc->irq_data))
|
||||
goto unlock;
|
||||
|
||||
desc->istate &= ~IRQS_SUSPENDED;
|
||||
irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED);
|
||||
__enable_irq(desc);
|
||||
|
||||
unlock:
|
||||
irq_put_desc_busunlock(desc, flags);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user