]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: Fix qdisc_notify()
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 22 May 2010 20:37:44 +0000 (20:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2010 06:11:07 +0000 (23:11 -0700)
commitc5d9ad4f666d992ff5cea8055de02382b1970da1
tree025244cdb7c4f0872f372564de2b82130fc7e867
parent7dc5067d1400f17ac595d0f445bbd457898ba3d6
net_sched: Fix qdisc_notify()

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>
net/sched/sch_api.c