1. 15 3月, 2011 3 次提交
    • R
      PM / Wakeup: Don't update events_check_enabled in pm_get_wakeup_count() · 790c7885
      Rafael J. Wysocki 提交于
      Since pm_save_wakeup_count() has just been changed to clear
      events_check_enabled unconditionally before checking if there are
      any new wakeup events registered since the last read from
      /sys/power/wakeup_count, the detection of wakeup events during
      suspend may be disabled, after it's been enabled, by writing a
      "wrong" value back to /sys/power/wakeup_count.  For this reason,
      it is not necessary to update events_check_enabled in
      pm_get_wakeup_count() any more.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      790c7885
    • R
      PM / Wakeup: Make pm_save_wakeup_count() work as documented · 378eef99
      Rafael J. Wysocki 提交于
      According to Documentation/ABI/testing/sysfs-power, the
      /sys/power/wakeup_count interface should only make the kernel react
      to wakeup events during suspend if the last write to it has been
      successful.  However, if /sys/power/wakeup_count is written to two
      times in a row, where the first write is successful and the second
      is not, the kernel will still react to wakeup events during suspend
      due to a bug in pm_save_wakeup_count().
      
      Fix the bug by making pm_save_wakeup_count() clear
      events_check_enabled unconditionally before checking if there are
      any new wakeup events registered since the previous read from
      /sys/power/wakeup_count.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      378eef99
    • R
      PM / Wakeup: Combine atomic counters to avoid reordering issues · 023d3779
      Rafael J. Wysocki 提交于
      The memory barrier in wakeup_source_deactivate() is supposed to
      prevent the callers of pm_wakeup_pending() and pm_get_wakeup_count()
      from seeing the new value of events_in_progress (0, in particular)
      and the old value of event_count at the same time.  However, if
      wakeup_source_deactivate() is executed by CPU0 and, for instance,
      pm_wakeup_pending() is executed by CPU1, where both processors can
      reorder operations, the memory barrier in wakeup_source_deactivate()
      doesn't affect CPU1 which can reorder reads.  In that case CPU1 may
      very well decide to fetch event_count before it's modified and
      events_in_progress after it's been updated, so pm_wakeup_pending()
      may fail to detect a wakeup event.  This issue can be addressed by
      using a single atomic variable to store both events_in_progress
      and event_count, so that they can be updated together in a single
      atomic operation.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      023d3779
  2. 14 3月, 2011 7 次提交
  3. 13 3月, 2011 3 次提交
  4. 11 3月, 2011 10 次提交
  5. 10 3月, 2011 1 次提交
    • J
      watchdog: sbc_fitpc2_wdt, fix crash on systems without DMI_BOARD_NAME · d4065775
      Jiri Slaby 提交于
      Some systems don't provide DMI_BOARD_NAME in their DMI tables. Avoid
      crash in such situations in fitpc2_wdt_init.
      
      The fix is to check if the dmi_get_system_info return value is NULL.
      
      The oops:
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff81253ae6>] strstr+0x26/0xa0
      PGD 3966e067 PUD 39605067 PMD 0
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
      CPU 1
      Modules linked in: ...
      Pid: 1748, comm: modprobe Not tainted 2.6.37-22-default #1 /Bochs
      RIP: 0010:[<ffffffff81253ae6>]  [<ffffffff81253ae6>] strstr+0x26/0xa0
      RSP: 0018:ffff88003ad73f18  EFLAGS: 00010206
      RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 00000000ffffffff
      RDX: ffffffffa003f4cc RSI: ffffffffa003f4c2 RDI: 0000000000000000
      ...
      CR2: 0000000000000000 CR3: 000000003b7ac000 CR4: 00000000000006e0
      ...
      Process modprobe (pid: 1748, threadinfo ffff88003ad72000, task ffff88002e6365c0)
      Stack: ...
      Call Trace:
       [<ffffffffa004201f>] fitpc2_wdt_init+0x1f/0x13c [sbc_fitpc2_wdt]
       [<ffffffff810002da>] do_one_initcall+0x3a/0x170
      ...
      Code: f3 c3 0f 1f 00 80 3e 00 53 48 89 f8 74 1b 48 89 f2 0f 1f 40 00 48 83 c2 01 80 3a 00 75 f7 49 89 d0 48 89 f8 49 29 f0 75 02 5b c3 <80> 3f 00 74 0e 0f 1f 44 00 00 48 83 c0 01 80 38 00 75 f7 49 89
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      d4065775
  6. 09 3月, 2011 5 次提交
  7. 08 3月, 2011 8 次提交
  8. 07 3月, 2011 3 次提交