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