diff options
| author | Tobias Schumacher <ts@linux.ibm.com> | 2026-10-09 08:15:51 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-10-13 17:01:47 +0200 |
| commit | 422d75ad5bc96b8eb9cb3cfd9d68fc685a0a9b75 (patch) | |
| tree | 7375be0c1dacbaf8e105b451eedf4165356a7d42 /tools/lib/python | |
| parent | 1844913582fec337c54b54fdd3c92ce225930515 (diff) | |
| download | linux-next-422d75ad5bc96b8eb9cb3cfd9d68fc685a0a9b75.tar.gz linux-next-422d75ad5bc96b8eb9cb3cfd9d68fc685a0a9b75.zip | |
s390/pci: Fix use-after-free race in zpci floating interrupt cleanup
zpci_clear_irq() stops the adapter from raising new interrupts for the
function, but a zpci_floating_irq_handler() already running on another CPU
can still be scanning zdev->aibv when zpci_msi_teardown_floating() releases
it.
Clear the zpci_ibv[] entry so no further handler picks the vector up, then
wait for a grace period before releasing it. The handler runs inside the
rcu_read_lock() section that do_airq_interrupt() holds across
airq->handler(), so synchronize_rcu() drains any handler still in flight.
Release the vector and free the summary bit only after the grace period, so
neither can be reused while a reader still holds the old pointer.
zpci_ibv served both delivery modes, indexed by function under
FLOATING and by cpu under DIRECTED. Only the floating vectors are
published to and torn down under the interrupt handler, so split the
directed vectors out into zpci_dibv and annotate zpci_ibv __rcu, which
lets sparse check the accessors above.
Fixes: f770950a4709 ("s390/pci: Migrate s390 IRQ logic to IRQ domain API")
Cc: stable@vger.kernel.org
Signed-off-by: Tobias Schumacher <ts@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
