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. 29 8月, 2013 1 次提交
  3. 28 8月, 2013 1 次提交
  4. 24 8月, 2013 4 次提交
  5. 23 8月, 2013 1 次提交
    • G
      sysfs.h: remove attr_name() macro · 3e1026b3
      Greg Kroah-Hartman 提交于
      Gotta love a macro that doesn't reduce the typing you have to do.
      
      Also, only the driver core, and one network driver uses this.  The
      driver core functions will be going away soon, and I'll convert the
      network driver soon to not need this as well, so delete it for now
      before anyone else gets some bright ideas and wants to use it.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e1026b3
  6. 22 8月, 2013 9 次提交
  7. 20 8月, 2013 3 次提交
  8. 13 8月, 2013 4 次提交
  9. 30 7月, 2013 1 次提交
    • H
      cpu topology: remove stale arch_provides_topology_pointers and define_siblings_show_map/list() · 29f1953d
      Hanjun Guo 提交于
      arch_provides_topology_pointers was introduced in commit 23ca4bba (x86:
      cleanup early per cpu variables/accesses v4) to indicate pointers to the
      topology cpumask_t maps are valid to avoid copying data on to/off of the
      stack.
      
      But later in commit fbd59a8d (cpumask: Use topology_core_cpumask()/
      topology_thread_cpumask()), the pointers to the topology struct cpumask maps
      are always valid.
      
      After that commit, the only difference is that there is a redundant
      "unsigned int cpu = dev->id;" if arch_provides_topology_pointers defined, but
      dev->id is type 'u32' which devolves to 'unsigned int' on all supported arches.
      So this arch_provides_topology_pointers define is pointless and only cause
      obfuscation now, remove it.
      
      Tested on x86 machine, topology information in sys/devices/system/cpu/
      cpuX/topology/ is the same after appling this patch set.
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      29f1953d
  10. 27 7月, 2013 2 次提交
  11. 17 7月, 2013 3 次提交
  12. 15 7月, 2013 1 次提交
  13. 04 7月, 2013 2 次提交
  14. 28 6月, 2013 1 次提交
    • M
      reservation: cross-device reservation support, v4 · 786d7257
      Maarten Lankhorst 提交于
      This adds support for a generic reservations framework that can be
      hooked up to ttm and dma-buf and allows easy sharing of reservations
      across devices.
      
      The idea is that a dma-buf and ttm object both will get a pointer
      to a struct reservation_object, which has to be reserved before
      anything is done with the contents of the dma-buf.
      
      Changes since v1:
       - Fix locking issue in ticket_reserve, which could cause mutex_unlock
         to be called too many times.
      Changes since v2:
       - All fence related calls and members have been taken out for now,
         what's left is the bare minimum to be useful for ttm locking conversion.
      Changes since v3:
       - Removed helper functions too. The documentation has an example
         implementation for locking. With the move to ww_mutex there is no
         need to have much logic any more.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      786d7257
  15. 26 6月, 2013 1 次提交
  16. 24 6月, 2013 1 次提交
  17. 22 6月, 2013 1 次提交
  18. 21 6月, 2013 1 次提交
    • J
      PM / Sleep: Print last wakeup source on failed wakeup_count write · bb177fed
      Julius Werner 提交于
      Commit a938da06 introduced a useful little log message to tell
      users/debuggers which wakeup source aborted a suspend.  However,
      this message is only printed if the abort happens during the
      in-kernel suspend path (after writing /sys/power/state).
      
      The full specification of the /sys/power/wakeup_count facility
      allows user-space power managers to double-check if wakeups have
      already happened before it actually tries to suspend (e.g. while it
      was running user-space pre-suspend hooks), by writing the last known
      wakeup_count value to /sys/power/wakeup_count.  This patch changes
      the sysfs handler for that node to also print said log message if
      that write fails, so that we can figure out the offending wakeup
      source for both kinds of suspend aborts.
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bb177fed
  19. 19 6月, 2013 2 次提交