]> git.kernelconcepts.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 20:32:52 +0000 (12:32 -0800)
commitbfd62064efe736c254679f66ee37cf087ad60a72
tree64179f207b690e7b02a219b4e48ae645faeb3071
parent5cabd386ccf73b4a267f8c95e3a0b6e88f297188
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: Greg Kroah-Hartman <gregkh@suse.de>
net/sched/sch_api.c