mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-12-08 05:04:04 +00:00
NR_MAX_IRQS is defined as 272 and IRQ_INVALID as 273 which implies that 272 is a valid irq number. In this case, an illegal access can occur at run time when irq_desc_array[] or irq_count[] is accessed with index 272. This fix stops the illegal access by renaming NR_MAX_IRQS to NR_IRQS and then places proper conditions for range checks. If the index is >= NR_IRQS, then index is invalid otherwise its considered valid for accessing irq arrays. IRQ_INVALID definition is also changed to 0xffffffffU to indicate maximum unsigned value. Signed-off-by: Madeeha Javed <madeeha_javed@mentor.com>
11 KiB
11 KiB