Commit e8a83e10 authored by Jarek Poplawski's avatar Jarek Poplawski Committed by David S. Miller

pkt_sched: Fix qdisc state in net_tx_action()

net_tx_action() can skip __QDISC_STATE_SCHED bit clearing while qdisc
is neither ran nor rescheduled, which may cause endless loop in
dev_deactivate().
Reported-by: default avatarDenys Fedoryshchenko <denys@visp.net.lb>
Tested-by: default avatarDenys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3b802ba
...@@ -1991,8 +1991,13 @@ static void net_tx_action(struct softirq_action *h) ...@@ -1991,8 +1991,13 @@ static void net_tx_action(struct softirq_action *h)
spin_unlock(root_lock); spin_unlock(root_lock);
} else { } else {
if (!test_bit(__QDISC_STATE_DEACTIVATED, if (!test_bit(__QDISC_STATE_DEACTIVATED,
&q->state)) &q->state)) {
__netif_reschedule(q); __netif_reschedule(q);
} else {
smp_mb__before_clear_bit();
clear_bit(__QDISC_STATE_SCHED,
&q->state);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment