Message ID | 1544014590-14429-5-git-send-email-laoar.shao@gmail.com |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
Series | [1/5] netfilter: fix general protection fault when unregister sysctl table | expand |
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c index 316fef3..3caf137 100644 --- a/net/netfilter/nf_conntrack_proto.c +++ b/net/netfilter/nf_conntrack_proto.c @@ -252,6 +252,7 @@ int nf_ct_l4proto_pernet_register_one(struct net *net, goto out; } + ret = -EINVAL; pn = nf_ct_l4proto_net(net, l4proto); if (pn == NULL) goto out;
If pn is NULL, it will return 0. That's not proper. We should return an error. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> --- net/netfilter/nf_conntrack_proto.c | 1 + 1 file changed, 1 insertion(+)