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] [day] [month] [year] [list]
Date:	Fri, 19 Jun 2009 03:12:10 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Netdev <netdev@...r.kernel.org>
Cc:	Thomas Graf <tgraf@...g.ch>,
	"Eric W. Biederman" <ebiederm@...stanetworks.com>
Subject: Re: [PATCH] genetlink: make netns aware

On Thu, 2009-06-18 at 13:17 +0200, Johannes Berg wrote:
> This makes generic netlink network namespace aware.

Please drop this patch, it has a deadlock bug.

> +int genlmsg_multicast(struct sk_buff *skb, u32 pid,
> +		      unsigned int group, gfp_t flags)
> +{
> +	int ret;
> +
> +	if (flags & GFP_ATOMIC) {
> +		rcu_read_lock();
> +		ret = genlmsg_mcast(skb, pid, group, flags);
> +		rcu_read_unlock();
> +	} else {
> +		rtnl_lock();
> +		ret = genlmsg_mcast(skb, pid, group, flags);
> +		rtnl_unlock();
> +	}
> +
> +	return ret;
> +}

It used to be possible to call genlmsg_multicast() under rtnl, which
will now obviously deadlock unless you also make it GFP_ATOMIC... I'm
inclined to always use RCU here to solve that, comments?

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ