Skip to content
Snippets Groups Projects
  1. Feb 26, 2014
  2. Jan 09, 2014
  3. Dec 09, 2013
  4. Sep 27, 2013
  5. Aug 30, 2013
    • Maxime Bizon's avatar
      firmware loader: fix pending_fw_head list corruption · 1eeeef15
      Maxime Bizon authored
      
      Got the following oops just before reboot:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [<8028d300>] (__list_del_entry+0x44/0xac)
      [<802e3320>] (__fw_load_abort.part.13+0x1c/0x50)
      [<802e337c>] (fw_shutdown_notify+0x28/0x50)
      [<80034f80>] (notifier_call_chain.isra.1+0x5c/0x9c)
      [<800350ec>] (__blocking_notifier_call_chain+0x44/0x58)
      [<80035114>] (blocking_notifier_call_chain+0x14/0x18)
      [<80035d64>] (kernel_restart_prepare+0x14/0x38)
      [<80035d94>] (kernel_restart+0xc/0x50)
      
      The following race condition triggers here:
      
        _request_firmware_load()
        device_create_file(...)
        kobject_uevent(...)
        (schedule)
                                             (resume)
                                             firmware_loading_store(1)
                                             firmware_loading_store(0)
                                             list_del_init(&buf->pending_list)
                                             (schedule)
        (resume)
        list_add(&buf->pending_list, &pending_fw_head);
        wait_for_completion(&buf->completion);
      
      causing an oops later when walking pending_list after the firmware has
      been released.
      
      The proposed fix is to move the list_add() before sysfs attribute
      creation.
      
      Signed-off-by: default avatarMaxime Bizon <mbizon@freebox.fr>
      Acked-by: default avatarMing Lei <ming.lei@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1eeeef15
  6. Aug 24, 2013
  7. Jun 26, 2013
  8. Jun 21, 2013
  9. Jun 18, 2013
  10. Jun 06, 2013
  11. Jun 04, 2013
  12. Jun 03, 2013
  13. Feb 26, 2013
  14. Feb 04, 2013
  15. Jan 16, 2013
    • Luciano Coelho's avatar
      firmware: make sure the fw file size is not 0 · 4adf07fb
      Luciano Coelho authored
      
      If the requested firmware file size is 0 bytes in the filesytem, we
      will try to vmalloc(0), which causes a warning:
      
        vmalloc: allocation failure: 0 bytes
        kworker/1:1: page allocation failure: order:0, mode:0xd2
          __vmalloc_node_range+0x164/0x208
          __vmalloc_node+0x4c/0x58
          vmalloc+0x38/0x44
          _request_firmware_load+0x220/0x6b0
          request_firmware+0x64/0xc8
          wl18xx_setup+0xb4/0x570 [wl18xx]
          wlcore_nvs_cb+0x64/0x9f8 [wlcore]
          request_firmware_work_func+0x94/0x100
          process_one_work+0x1d0/0x750
          worker_thread+0x184/0x4ac
          kthread+0xb4/0xc0
      
      To fix this, check whether the file size is less than or equal to zero
      in fw_read_file_contents().
      
      Cc: stable <stable@vger.kernel.org> [3.7]
      Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
      Acked-by: default avatarMing Lei <ming.lei@canonical.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4adf07fb
  16. Nov 15, 2012
  17. Oct 28, 2012
  18. Oct 22, 2012
  19. Oct 04, 2012
  20. Sep 11, 2012
  21. Sep 06, 2012
    • Ming Lei's avatar
      firmware loader: let caching firmware piggyback on loading firmware · ac39b3ea
      Ming Lei authored
      
      After starting caching firmware, there is still some time left
      before devices are suspended, during the period, request_firmware
      or its nowait version may still be triggered by the below situations
      to load firmware images which can't be cached during suspend/resume
      cycle.
      
      	- new devices added
      	- driver bind
      	- or device open kind of things
      
      This patch utilizes the piggyback trick to cache firmware for
      this kind of situation: just increase the firmware buf's reference
      count and add the fw name entry into cache entry list after starting
      caching firmware and before syscore_suspend() is called.
      
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac39b3ea
Loading