]> 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)
committerWilly Tarreau <w@1wt.eu>
Sat, 11 Feb 2012 14:37:52 +0000 (15:37 +0100)
commit3c87aca6dc9691b010dc4f06b24902fd35965520
tree53013ea046f57b7a86945ed97802d8f7cc1d43ca
parent2da16873a83ea82ab1068c025a067d6e24bfa3e9
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/sched/sch_api.c