]> git.baikalelectronics.ru Git - kernel.git/commit
sch_sfq: fix null pointer dereference at timer expiration
authorPaolo Abeni <pabeni@redhat.com>
Tue, 28 Nov 2017 13:28:39 +0000 (14:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 20:54:05 +0000 (15:54 -0500)
commitf17c02170faa8d47c8f8d8cae6e25f4fb636d672
tree7b7b208dcc0d37e0f69b875e9142471fe50135be
parenta1a959d6b3a3a53a621457e0bb415b92b6742baa
sch_sfq: fix null pointer dereference at timer expiration

While converting sch_sfq to use timer_setup(), the commit 74af03fd7475
("net: sched: Convert timers to use timer_setup()") forgot to
initialize the 'sch' field. As a result, the timer callback tries to
dereference a NULL pointer, and the kernel does oops.

Fix it initializing such field at qdisc creation time.

Fixes: 74af03fd7475 ("net: sched: Convert timers to use timer_setup()")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_sfq.c