lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Apr 2013 12:08:44 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Pravin B Shelar <pshelar@...ira.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] ipv6: Kill ipv6 dependency of icmpv6_send().

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 *)


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ