[NET]: Fix dev->qdisc race for NETDEV_TX_LOCKED case
commit5830725f8a36908111ecccf2899d06d6dcf54d45
authorThomas Graf <tgraf@suug.ch>
Thu, 10 May 2007 11:02:41 +0000 (10 04:02 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 11 May 2007 06:47:39 +0000 (10 23:47 -0700)
tree5f06185bf908327f51e027ae35391215e6d80253
parentfc038410b4b1643766f8033f4940bcdb1dace633
[NET]: Fix dev->qdisc race for NETDEV_TX_LOCKED case

When transmit fails with NETDEV_TX_LOCKED the skb is requeued
to dev->qdisc again. The dev->qdisc pointer is protected by
the queue lock which needs to be dropped when attempting to
transmit and acquired again before requeing. The problem is
that qdisc_restart() fetches the dev->qdisc pointer once and
stores it in the `q' variable which is invalidated when
dropping the queue_lock, therefore the variable needs to be
refreshed before requeueing.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c