Message ID | 538873335b034d7d97a08d2343e898cfa924918a.1649913521.git.duoming@zju.edu.cn (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Fix double free bugs and UAF bug in nfcmrvl module | expand |
Hello there, Sorry, the actual case does not match the description. The netlink operations may has nothing to do with the double free and we will dynamically check this again. Sorry again for the false tag and the false alarm. T.T Regards Lin Ma
diff --git a/drivers/nfc/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c index c22a4556db5..bb9e7e2bdec 100644 --- a/drivers/nfc/nfcmrvl/fw_dnld.c +++ b/drivers/nfc/nfcmrvl/fw_dnld.c @@ -115,8 +115,10 @@ static void fw_dnld_over(struct nfcmrvl_private *priv, u32 error) /* failed, halt the chip to avoid power consumption */ nfcmrvl_chip_halt(priv); } - - nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); + spin_lock_irq(&priv->fw_dnld.lock); + if (priv->ndev->nfc_dev->fw_download_in_progress) + nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); + spin_unlock_irq(&priv->fw_dnld.lock); } static void fw_dnld_timeout(struct timer_list *t)