From 30f07a9dc15c5445a787c9ca4f14426c888e4d34 Mon Sep 17 00:00:00 2001 From: Naga Date: Tue, 2 Jun 2020 15:15:22 +0530 Subject: [PATCH] qcacmn: Fix data type for ic_irqnum ic_irqnum saves the irq number given by platform, existing max irq which can be saved per ce is 255, if platform return irq greater than 255, value is misinterpreted with that saved in a byte, this will eventually have problem when host driver suspends/stop, during which freeing irq will fail. But in scenarios such as IPI mechanisms such as whunt, since free irq fails, it would still assume irq is enabled and call registered handlers, which will lead to null pointer access. Inorder to fix this changed data type to uint16_t. Change-Id: I0d92f965462a0a6416ee3dce880c4218e5ab09e8 CRs-Fixed: 2700577 --- hif/src/snoc/if_ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hif/src/snoc/if_ahb.c b/hif/src/snoc/if_ahb.c index c3ed8aaec83d..c584c778a7cf 100644 --- a/hif/src/snoc/if_ahb.c +++ b/hif/src/snoc/if_ahb.c @@ -44,7 +44,7 @@ #define HIF_IC_CE0_IRQ_OFFSET 4 #define HIF_IC_MAX_IRQ 52 -static uint8_t ic_irqnum[HIF_IC_MAX_IRQ]; +static uint16_t ic_irqnum[HIF_IC_MAX_IRQ]; /* integrated chip irq names */ const char *ic_irqname[HIF_IC_MAX_IRQ] = { "misc-pulse1",