]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net_sched: Fix qdisc_notify()
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 22 May 2010 20:37:44 +0000 (20:37 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:34:57 +0000 (15:34 -0400)
commitc88f1d0ac1138655c607b21d4eb7f2d45013ffc8
tree096080790b575c37a1ebfb1609eba48593bb250e
parent744f2110ae5939ebb75b2a3dd57ec64708481f82
net_sched: Fix qdisc_notify()

commit 53b0f08042f04813cd1a7473dacd3edfacb28eb3 upstream.

Ben Pfaff reported a kernel oops and provided a test program to
reproduce it.

https://kerneltrap.org/mailarchive/linux-netdev/2010/5/21/6277805

tc_fill_qdisc() should not be called for builtin qdisc, or it
dereference a NULL pointer to get device ifindex.

Fix is to always use tc_qdisc_dump_ignore() before calling
tc_fill_qdisc().

Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/sched/sch_api.c