mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Ensure shadow_v2 config is initialized
Fix a crash durring hif_wlan_enable where the shadow_v2 was dereferenced while pointing to garbage memory. For legacy ce, uninitialized values from the stack were left in the pld shadow_v2 config. The checks to skip printing the shadow_v2 config were confused by uninitized stack memory and the driver tries to dereference unitialized shadow_v2 memory. Ensure the configuration is filled with NULL & 0 when it is not applicable. Change-Id: I668fcf78b1a7c8e6e235d96e428a9808a4e072c7 CRs-Fixed: 2001315
This commit is contained in:
parent
4cbbad44e1
commit
e49a538582
1 changed files with 4 additions and 1 deletions
|
|
@ -2564,7 +2564,10 @@ static void ce_ring_setup_legacy(struct hif_softc *scn, uint8_t ring_type,
|
|||
static void ce_prepare_shadow_register_v2_cfg_legacy(struct hif_softc *scn,
|
||||
struct pld_shadow_reg_v2_cfg **shadow_config,
|
||||
int *num_shadow_registers_configured)
|
||||
{ /* noop */ }
|
||||
{
|
||||
*num_shadow_registers_configured = 0;
|
||||
*shadow_config = NULL;
|
||||
}
|
||||
|
||||
struct ce_ops ce_service_legacy = {
|
||||
.ce_get_desc_size = ce_get_desc_size_legacy,
|
||||
|
|
|
|||
Loading…
Reference in a new issue