[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1245373930.16399.4.camel@johannes.local>
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