]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: matchall: verify that filter is not NULL in mall_walk()
authorVlad Buslov <vladbu@mellanox.com>
Fri, 15 Feb 2019 15:17:56 +0000 (17:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 21:26:39 +0000 (13:26 -0800)
commit2a974a35a1f4d7ebc92df385ebd24dbdd73d0e37
tree15065b291045abc24f07c5f72086c417b6fcebe0
parent2642a86e126f12826b718b0f31dcbeb2da8f6734
net: sched: matchall: verify that filter is not NULL in mall_walk()

Check that filter is not NULL before passing it to tcf_walker->fn()
callback. This can happen when mall_change() failed to offload filter to
hardware.

Fixes: 9d7588c2b44f ("net: sched: protect filter_chain list with filter_chain_lock mutex")
Reported-by: Ido Schimmel <idosch@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_matchall.c