Thread (5 messages) flat view 5 messages, 2 authors, 2012-06-05

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2012-06-05 15:48:52

On Tue, Jun 5, 2012 at 12:38 AM, Johannes Berg
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -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".

                Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help