net: sched: cgroup: verify that filter is not NULL during walk
authorVlad Buslov <vladbu@mellanox.com>
Fri, 15 Feb 2019 15:18:44 +0000 (17:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 21:26:57 +0000 (13:26 -0800)
commit8b58d12f4ae1a10037b824b1fb409cf424d6aaac
treebdb529b1eae848320e967f01eb082ec5cd4430f0
parentd66022cd1623edfd7b43e13c9e973403a811af02
net: sched: cgroup: verify that filter is not NULL during walk

Check that filter is not NULL before passing it to tcf_walker->fn()
callback in cls_cgroup_walk(). This can happen when cls_cgroup_change()
failed to set first filter.

Fixes: ed76f5edccc9 ("net: sched: protect filter_chain list with filter_chain_lock mutex")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_cgroup.c