HomeFreeBSD

xen/intr: fix corruption of event channel table

Description

xen/intr: fix corruption of event channel table

In xen_intr_release_isrc(), the isrc should only be removed if it is
assigned to a valid port. This had been mitigated by using 0 for not
having a port, but this is actually corrupting the table. Fix this bug
as modifying the code would cause this bug to manifest as kernel memory
corruption. Similar issue for the vCPU bitmap masks.

The KASSERT() doesn't need lock protection.

Reviewed by: royger
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30743

Details

Provenance
ehem_freebsd_m5p.comAuthored on Aug 27 2021, 11:00 PM
roygerCommitted on Mar 29 2023, 7:51 AM
Reviewer
royger
Differential Revision
D30743: xen/intr: rework handling of event channel numbers in xen_intr.c
Parents
rG0ebf9bb42d7c: xen/intr: fix overflow of Xen interrupt range
Branches
Unknown
Tags
Unknown