The patch titled starfire: clean up properly if firmware loading fails has been removed from the -mm tree. Its filename was starfire-clean-up-properly-if-firmware-loading-fails.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: starfire: clean up properly if firmware loading fails From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx> netdev_open() will return without cleaning up net device or hardware state if firmware loading fails. This results in a BUG() on a second attempt to bring the interface up, reported in <http://bugzilla.kernel.org/show_bug.cgi?id=15117>, and probably has even worse effects if the driver is removed afterwards. Call netdev_close() to clean up on failure. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15091 Signed-off-by: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx> Reported-by: Michael Moffatt <michael@xxxxxxxxxxxxxx> Tested-by: Michael Moffatt <michael@xxxxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/starfire.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/net/starfire.c~starfire-clean-up-properly-if-firmware-loading-fails drivers/net/starfire.c --- a/drivers/net/starfire.c~starfire-clean-up-properly-if-firmware-loading-fails +++ a/drivers/net/starfire.c @@ -1063,7 +1063,7 @@ static int netdev_open(struct net_device if (retval) { printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n", FIRMWARE_RX); - return retval; + goto out_init; } if (fw_rx->size % 4) { printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", @@ -1108,6 +1108,9 @@ out_tx: release_firmware(fw_tx); out_rx: release_firmware(fw_rx); +out_init: + if (retval) + netdev_close(dev); return retval; } _ Patches currently in -mm which might be from bhutchings@xxxxxxxxxxxxxx are origin.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html