]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: fix error path in tcf_proto_create() when modules are not configured
authorJiri Pirko <jiri@mellanox.com>
Fri, 11 May 2018 15:45:32 +0000 (17:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 May 2018 20:34:38 +0000 (16:34 -0400)
commitef7c5369a74a9b0c1ae56bbbec8e93d61f3d97ca
treedd5a0c560c891823e6341b61bde23338d477c700
parent35cb6f3d4fede1622c018a0c652d05b930bbcfde
net: sched: fix error path in tcf_proto_create() when modules are not configured

In case modules are not configured, error out when tp->ops is null
and prevent later null pointer dereference.

Fixes: 581df2a66914 ("sched: push TC filter protocol creation into a separate function")
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