net: sched: fix error path in tcf_proto_create() when modules are not configured
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 net: sched: fix error path in tcf_proto_create() when modules are not configured
From: Jiri Pirko <[email protected]>
In case modules are not configured, error out when tp->ops is null and prevent later null pointer dereference.
Fixes 33a48927c193 ("sched: push TC filter protocol creation into a separate function")
Signed-off-by Jiri Pirko <[email protected]>
--- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/cls_api.c +1 -1
@@ -152,8 +152,8 @@ static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol,NL_SET_ERR_MSG (extack,"TC classifier not found" ); err = -ENOENT; } - goto errout;#endif + goto errout; } tp->classify = tp->ops->classify; tp->protocol = protocol;
Signature · 1 line
2.14.3
Quoted 7 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
In case modules are not configured, error out when
tp->opsis null and prevent later null pointer dereference.Fixes 33a48927c193 ("sched: push TC filter protocol creation into a separate function")Signed-off-by Jiri Pirko <[email protected]>
Acked-by Cong Wang <[email protected]>
David Miller
maintainerFrom: Jiri Pirko <[email protected]>
Date: Fri, 11 May 2018 17:45:32 +0200
Quoted 7 lines
From: Jiri Pirko <[email protected]>
In case modules are not configured, error out when
tp->opsis null and prevent later null pointer dereference.Fixes 33a48927c193 ("sched: push TC filter protocol creation into a separate function")Signed-off-by Jiri Pirko <[email protected]>
Applied and queued up for -stable.