Search Linux Wireless

Re: [PATCH 3.5] iwlwifi: fix double free/complete in firmware loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-06-05 at 08:48 -0700, Linus Torvalds wrote:
> On Tue, Jun 5, 2012 at 12:38 AM, Johannes Berg
> <johannes@xxxxxxxxxxxxxxxx> wrote:
> > @@ -861,13 +861,20 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
> >
> >        /* We have our copies now, allow OS release its copies */
> >        release_firmware(ucode_raw);
> > -       complete(&drv->request_firmware_complete);
> >
> >        drv->op_mode = iwl_dvm_ops.start(drv->trans, drv->cfg, &drv->fw);
> >
> > -       if (!drv->op_mode)
> > -               goto out_free_fw;
> > +       if (!drv->op_mode) {
> > +               complete(&drv->request_firmware_complete);
> > +               goto out_release_driver;
> > +       }
> 
> If you do it this way, you might as well replace the
> 
>    complete(&drv->request_firmware_complete);
>    goto out_release_driver;
> 
> with just a "goto out_unbind".

Good point.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux