Eric Dumazet ef352e7cdf net_sched: fix THROTTLED/RUNNING race
commit fd245a4adb52 (net_sched: move TCQ_F_THROTTLED flag)
added a race.

qdisc_watchdog() is run from softirq, so special care should be taken or
we can lose one state transition (THROTTLED/RUNNING)

Prior to fd245a4adb52, we were manipulating q->flags (qdisc->flags &=
~TCQ_F_THROTTLED;) and this manipulation could only race with
qdisc_warn_nonwc().

Since we want to avoid atomic ops in qdisc fast path - it was the
meaning of commit 371121057607e (QDISC_STATE_RUNNING dont need atomic
bit ops) - fix is to move THROTTLE bit into 'state' field, this one
being manipulated with SMP and IRQ safe operations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-24 00:13:14 -07:00
..
2011-03-15 09:57:38 -05:00
2011-03-15 09:36:50 +09:00
2010-11-29 09:45:15 -08:00
2010-12-31 10:47:46 -08:00
2010-06-03 03:21:52 -07:00
2010-10-27 11:37:32 -07:00
2010-10-25 13:09:44 -07:00
2009-11-04 05:06:25 -08:00
2010-11-24 11:16:42 -08:00
2010-12-19 21:59:35 -08:00
2010-09-23 14:33:39 -07:00
2010-10-25 13:09:45 -07:00
2011-03-21 20:39:24 -07:00
2011-03-01 12:35:03 -08:00
2010-10-27 11:37:32 -07:00
2010-06-03 03:21:52 -07:00
2009-12-26 20:46:28 -08:00
2010-06-03 03:21:52 -07:00
2010-12-02 13:27:33 -08:00
2011-03-15 09:36:50 +09:00
2011-02-08 16:17:55 -08:00
2011-01-24 15:32:47 -08:00
2009-07-26 19:11:14 -07:00
2010-11-24 11:16:43 -08:00
2011-03-01 12:35:03 -08:00
2011-03-01 12:35:03 -08:00
2009-10-07 16:39:43 -04:00
2010-11-28 11:12:20 -08:00