1. 11 8月, 2015 13 次提交
  2. 10 8月, 2015 26 次提交
  3. 08 8月, 2015 1 次提交
    • T
      net: Fix race condition in store_rps_map · 10e4ea75
      Tom Herbert 提交于
      There is a race condition in store_rps_map that allows jump label
      count in rps_needed to go below zero. This can happen when
      concurrently attempting to set and a clear map.
      
      Scenario:
      
      1. rps_needed count is zero
      2. New map is assigned by setting thread, but rps_needed count _not_ yet
         incremented (rps_needed count still zero)
      2. Map is cleared by second thread, old_map set to that just assigned
      3. Second thread performs static_key_slow_dec, rps_needed count now goes
         negative
      
      Fix is to increment or decrement rps_needed under the spinlock.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10e4ea75