Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 143afa00 authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

wcd9xxx: core: Fix crash while headset insert and remove



When insert and remove headset continuously observe crash.
In the interrupt table for wcd9306, there is a interrupt
number of WCD9XXX_IRQ_RESERVED_2 (value 32).
In IRQ driver, irqs will be dispatched  based on this
interrupt table. But for WCD9XXX_IRQ_RESERVED_2, this
value being 32 and BIT_BYTE will be 4 whereas number
of interrupt registers are 0 to 3 only.
Here status array used to check interrupt set, access each
entry of interrupt table and see if bit mask is set.
so, when checking for WCD9XXX_IRQ_RESERVED_2 it will
access out of bound array status[4] which will return
unexpected value.
In failed case, status[4] matches bitmask for 32nd bit
and dispatches irq for invalid entry causing crash.
Remove the entry as it is not a valid entry and causing
out of bound access for wcd9306 and wcd9320.

Change-Id: I82ed3b47a3bd7cee7a3c90a4fba4981a0528702f
CRs-Fixed: 729475
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent f23eb71e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment