1. 31 8月, 2013 1 次提交
    • M
      firmware loader: fix pending_fw_head list corruption · 1eeeef15
      Maxime Bizon 提交于
      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: NMaxime Bizon <mbizon@freebox.fr>
      Acked-by: NMing Lei <ming.lei@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1eeeef15
  2. 24 8月, 2013 1 次提交
  3. 26 6月, 2013 1 次提交
  4. 22 6月, 2013 1 次提交
  5. 19 6月, 2013 1 次提交
  6. 07 6月, 2013 3 次提交
  7. 05 6月, 2013 1 次提交
  8. 04 6月, 2013 4 次提交
  9. 26 2月, 2013 1 次提交
  10. 04 2月, 2013 4 次提交
  11. 17 1月, 2013 1 次提交
    • L
      firmware: make sure the fw file size is not 0 · 4adf07fb
      Luciano Coelho 提交于
      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: NLuciano Coelho <coelho@ti.com>
      Acked-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4adf07fb
  12. 15 11月, 2012 5 次提交
  13. 29 10月, 2012 1 次提交
  14. 22 10月, 2012 4 次提交
  15. 05 10月, 2012 1 次提交
  16. 04 10月, 2012 1 次提交
    • L
      firmware: teach the kernel to load firmware files directly from the filesystem · abb139e7
      Linus Torvalds 提交于
      This is a first step in allowing people to by-pass udev for loading
      device firmware.  Current versions of udev will deadlock (causing us to
      block for the 30 second timeout) under some circumstances if the
      firmware is loaded as part of the module initialization path, and this
      is causing problems for media drivers in particular.
      
      The current patch hardcodes the firmware path that udev uses by default,
      and will fall back to the legacy udev mode if the firmware cannot be
      found there.  We'd like to add support for both configuring the paths
      and the fallback behaviour, but in the meantime this hopefully fixes the
      immediate problem, while also giving us a way forward.
      
      [ v2: Some VFS layer interface cleanups suggested by Al Viro ]
      [ v3: use the default udev paths suggested by Kay Sievers ]
      Suggested-by: NIvan Kalvachev <ikalvachev@gmail.com>
      Acked-by: NGreg KH <gregkh@linuxfoundation.org>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Kay Sievers <kay@redhat.com>
      Cc: Ming Lei <ming.lei@canonical.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abb139e7
  17. 11 9月, 2012 1 次提交
  18. 07 9月, 2012 2 次提交
  19. 17 8月, 2012 6 次提交