[PATCH v2 0/4] xen/drivers/char: fix IRQ registration failure propagation

Oleksii Moisieiev posted 4 patches 3 days, 7 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1775742562.git.oleksii._5Fmoisieiev@epam.com
xen/drivers/char/cadence-uart.c    | 17 +++++++++++------
xen/drivers/char/exynos4210-uart.c |  4 ++++
xen/drivers/char/pl011.c           | 17 +++++++++++------
xen/drivers/char/scif-uart.c       | 16 ++++++++++++----
4 files changed, 38 insertions(+), 16 deletions(-)
[PATCH v2 0/4] xen/drivers/char: fix IRQ registration failure propagation
Posted by Oleksii Moisieiev 3 days, 7 hours ago
This series fixes a common bug pattern found in several Xen UART drivers:
when setup_irq() fails during post-IRQ initialization, drivers log the
error but continue executing and unconditionally unmask hardware
interrupt lines with no handler registered. On platforms where the GIC
receives these asserted lines, the result is either repeated
spurious-interrupt warnings or an unhandled interrupt fault.

Patch 1, originally submitted as a standalone fix in v1, addresses
the issue in the SCIF driver and moves the hardware error-flag clearing
sequence to before the setup_irq() call so that stale error bits are
cleared unconditionally. Patches 2-4 apply the same early-return fix to
the pl011, cadence-uart, and exynos4210-uart drivers.

The pl011 and cadence-uart drivers additionally had a positive-condition
IRQ guard (if uart->irq > 0) that could fall through to the interrupt
unmask even when no valid IRQ was provided. Both are restructured to
use the early-return idiom.

Changes in v2:
- Extend fix to pl011, cadence-uart and exynos4210
- fix typo in patch 1 description

Oleksii Moisieiev (4):
  xen/drivers/char: fix SCIF IRQ registration failure propagation
  xen/drivers/char/pl011: fix IRQ registration failure propagation
  xen/drivers/char/cadence-uart: fix IRQ registration failure
    propagation
  xen/drivers/char: fix exynos4210 IRQ registration failure propagation

 xen/drivers/char/cadence-uart.c    | 17 +++++++++++------
 xen/drivers/char/exynos4210-uart.c |  4 ++++
 xen/drivers/char/pl011.c           | 17 +++++++++++------
 xen/drivers/char/scif-uart.c       | 16 ++++++++++++----
 4 files changed, 38 insertions(+), 16 deletions(-)

-- 
2.43.0

base-commit: 2ca756d39f59f834160263fd142ef91c6ca3dd90
branch: amoi_dfmea_scif