[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+pR_z9E3Qz_C9xZiLh7f2Genc8rvZCWRUDvP-0TSkxX7w@mail.gmail.com>
Date: Thu, 25 Apr 2013 13:13:54 -0700
From: Pravin Shelar <pshelar@...ira.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] ipv6: Kill ipv6 dependency of icmpv6_send().
On Thu, Apr 25, 2013 at 12:08 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Thu, 2013-04-25 at 11:37 -0700, Pravin B Shelar wrote:
>
>> +int inet6_register_icmp_sender(ip6_icmp_send_t *fn)
>> +{
>> + return (cmpxchg(&ip6_icmp_send, NULL, fn) == NULL) ? 0 : -EBUSY;
>> +}
>> +EXPORT_SYMBOL(inet6_register_icmp_sender);
>> +
>> +int inet6_unregister_icmp_sender(ip6_icmp_send_t *fn)
>> +{
>> + int ret;
>> +
>> + ret = (cmpxchg(&ip6_icmp_send, fn, NULL) == fn) ? 0 : -EINVAL;
>> +
>> + synchronize_net();
>> +
>> + return ret;
>> +}
>> +EXPORT_SYMBOL(inet6_unregister_icmp_sender);
>
> Good idea, but I bet you didn't run sparse on this code...
>
> CONFIG_SPARSE_RCU_POINTER=y
>
> make C=2 net/ipv6/ip6_icmp.o
>
> you probably need to cast to (ip6_icmp_send_t *)
>
right, Let me send fix for it.
>
--
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