[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr0YXy+xoE4rVRFmd6pQbE+biw+8008Nd_VbyaSMn8c9+w@mail.gmail.com>
Date: Wed, 29 May 2013 11:31:04 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: Eric Dumazet <edumazet@...gle.com>,
David Miller <davem@...emloft.net>,
YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>,
Vasiliy Kulikov <segoon@...nwall.com>,
Lorenzo Colitti <lorenzo@...gle.com>
Subject: Re: [PATCH 3/3] net: ipv6: Implement /proc/net/icmp6.
On Tue, May 28, 2013 at 11:45 PM, Lorenzo Colitti <lorenzo@...gle.com> wrote:
> +int __init pingv6_init(void)
> +{
> + int ret;
> + pingv6_ops.ipv6_recv_error = ipv6_recv_error;
> + pingv6_ops.ip6_datagram_recv_ctl = ip6_datagram_recv_ctl;
> + pingv6_ops.icmpv6_err_convert = icmpv6_err_convert;
> + pingv6_ops.ipv6_icmp_error = ipv6_icmp_error;
> + pingv6_ops.ipv6_chk_addr = ipv6_chk_addr;
> +#ifdef CONFIG_PROC_FS
> + ret = register_pernet_subsys(&ping_v6_net_ops);
> + if (ret)
> + return ret;
Nit: if register_pernet_subsys fails (ENOMEM?) then we return failure
and stop the IPv6 module from loading, but the function pointers
inside pingv6_ops are never cleared.
I don't think this has any impact, because if this happens, the proto
isn't registered, so there's no way to create an IPv6 socket and call
these function pointers. Still, for completeness' sake I'll shortly
send out another patch 3/3 that checks the result of
register_pernet_subsys before updating the function pointers. The
other two patches in the set don't need to change.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists