Skip to contentSkip to conversation

iwlwifi: dbg: support multiple dumps in legacy dump flow

bug report Dan Carpenter 1 participant 1 message May 6, 2020

lore
Share & tools
lore
#0 lore raw

Hello Shahar S Matityahu,

This is a semi-automatic email about new static checker warnings.

The patch 7a99c877ae8e: "iwlwifi: dbg: support multiple dumps in legacy dump flow" from Apr 17, 2020, leads to the following Smatch complaint:

drivers/net/wireless/intel/iwlwifi/fw/dbg.c:2182 iwl_fw_free_dump_desc()
error: we previously assumed 'desc' could be null (see line 2179)

drivers/net/wireless/intel/iwlwifi/fw/dbg.c
2178 {
2179 if (desc && *desc != &iwl_dump_desc_assert)

                    ^^^^

New check for NULL

2180 kfree(*desc);
2181

  2182		*desc = NULL;
                ^^^^^

New unchecked dereference.

  2183		fwrt->dump.lmac_err_id[0] = 0;
  2184		if (fwrt->smem_cfg.num_lmacs > 1)

regards,
dan carpenter