1. 16 9月, 2011 1 次提交
    • R
      target: Fix race between multiple invocations of target_qf_do_work() · bcac364a
      Roland Dreier 提交于
      When work is scheduled with schedule_work(), the work can end up
      running on multiple CPUs at the same time -- this happens if
      the work is already running on one CPU and schedule_work() is called
      on another CPU.  This leads to list corruption with target_qf_do_work(),
      which is roughly doing:
      
      	spin_lock(...);
      	list_for_each_entry_safe(...) {
      		list_del(...);
      		spin_unlock(...);
      
      		// do stuff
      
      		spin_lock(...);
      	}
      
      With multiple CPUs running this code, one CPU can end up deleting the
      list entry that the other CPU is about to work on.
      
      Fix this by splicing the list entries onto a local list and then
      operating on that in the work function.  This way, each invocation of
      target_qf_do_work() operates on its own local list and so multiple
      invocations don't corrupt each other's list.  This also avoids dropping
      and reacquiring the lock for each list entry.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bcac364a
  2. 15 9月, 2011 7 次提交
  3. 14 9月, 2011 2 次提交
  4. 13 9月, 2011 1 次提交
    • G
      hwmon: (pmbus) Fix low limit temperature alarms · 40257b95
      Guenter Roeck 提交于
      Temperature alarms are detected by checking the alarm bit and comparing
      temperature limits against the current temperature. For low limits, this
      comparison needs to be reversed (temp < limit instead of temp > limit).
      This was not taken into account, resulting in wrong alarms if a temperature
      fell below a low limit.
      
      Fix by adding a low limit flag in the limit data structure. When creating the
      sensor entry, the order of registers to compare is now reversed for low limits.
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Cc: stable@kernel.org # 3.0+
      40257b95
  5. 11 9月, 2011 9 次提交
  6. 10 9月, 2011 5 次提交
  7. 09 9月, 2011 6 次提交
  8. 07 9月, 2011 6 次提交
  9. 06 9月, 2011 3 次提交