]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: fix p_filter_chain check in tcf_chain_flush
authorJiri Pirko <jiri@mellanox.com>
Fri, 18 Aug 2017 08:10:43 +0000 (10:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 17:19:11 +0000 (10:19 -0700)
commitcad54f4d4d87b164d2851e754595d414cf592aba
treea81f0632c483e2d8733a401339b9d5fbef3c67ba
parentc42299f11e4805846935b1892ec602e928f65572
net: sched: fix p_filter_chain check in tcf_chain_flush

The dereference before check is wrong and leads to an oops when
p_filter_chain is NULL. The check needs to be done on the pointer to
prevent NULL dereference.

Fixes: 1c7b1f33070c ("net/sched: fix filter flushing")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c