Skip to content

Commit b047794

Browse files
jpirkogregkh
authored andcommitted
net: sched: fix error path in tcf_proto_create() when modules are not configured
[ Upstream commit d68d75f ] In case modules are not configured, error out when tp->ops is null and prevent later null pointer dereference. Fixes: 33a4892 ("sched: push TC filter protocol creation into a separate function") Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f629411 commit b047794

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/cls_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol,
151151
} else {
152152
err = -ENOENT;
153153
}
154-
goto errout;
155154
#endif
155+
goto errout;
156156
}
157157
tp->classify = tp->ops->classify;
158158
tp->protocol = protocol;

0 commit comments

Comments
 (0)