pkt_sched: sch_generic: Fix oops in sch_teql
commit9a8eac41549d7ae0e40744177edd8dc8d59592e4
authorJarek Poplawski <jarkao2@gmail.com>
Mon, 20 Oct 2008 06:37:47 +0000 (19 23:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Nov 2008 03:05:41 +0000 (6 19:05 -0800)
tree63c5bfcb30b7c85ba8012e8533e3b48c2211b800
parenta331c85a4d4b4d150d1cd9217aec376cabedd0bf
pkt_sched: sch_generic: Fix oops in sch_teql

[ Upstream commit 9f3ffae0dbce491a3e9871b686342fd5aa854f05 ]

After these commands:
# modprobe sch_teql
# tc qdisc add dev eth0 root teql0
# tc qdisc del dev eth0 root
we get an oops in teql_destroy() when spin_lock is taken from a null
qdisc_sleeping pointer. It's because at the moment teql0 dev haven't
been activated yet, and a qdisc_root_sleeping() is pointing to noop
qdisc's netdev_queue with qdisc_sleeping uninitialized. This patch
fixes this both for noop and noqueue netdev_queues to avoid similar
problems in the future.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sched/sch_generic.c