diff options
author | Dan Williams <dcbw@redhat.com> | 2013-10-15 02:51:55 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 22:03:54 +0400 |
commit | 1dfba3060fe7ee03ccec25a91d35085142dfc295 (patch) | |
tree | c27da4ef59aeaa75b1d39c46af0aeed4f7ba7147 /drivers/net/wireless/libertas/if_spi.c | |
parent | e07f01e4c7d583adb1ec25e63a52db5fc10a94d3 (diff) | |
download | linux-1dfba3060fe7ee03ccec25a91d35085142dfc295.tar.xz |
libertas: move firmware lifetime handling to firmware.c
Previously, each bus type was responsible for freeing the firmware
structure, but some did that badly. Move responsibility for freeing
firmware into firmware.c so that it's done once and correctly, instead
of happening in multiple places in bus-specific code.
This fixes a use-after-free bug found by Dr. H. Nikolaus Schaller where
the SDIO code forgot to NULL priv->helper_fw after freeing it.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_spi.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_spi.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index 5d39ec880d84..83669151bb82 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c @@ -1094,11 +1094,7 @@ static int if_spi_init_card(struct if_spi_card *card) goto out; out: - release_firmware(helper); - release_firmware(mainfw); - lbs_deb_leave_args(LBS_DEB_SPI, "err %d\n", err); - return err; } |