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:
Houston Hoffman 2017-02-01 16:51:52 -08:00 • committed by qcabuildsw
commit e49a538582

View file

@ -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,