diff --git a/[refs] b/[refs] index 8a3dd746c013..d65ce76d47ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e3f7faf3e8a3e226b1a6b955aac12abf2f2e1b6 +refs/heads/master: 1c87733d0682547050ccccb400cdac425fa43b39 diff --git a/trunk/include/net/net_namespace.h b/trunk/include/net/net_namespace.h index 65af9a07cf76..1bf812b21fb7 100644 --- a/trunk/include/net/net_namespace.h +++ b/trunk/include/net/net_namespace.h @@ -88,7 +88,7 @@ struct net { #ifdef CONFIG_WEXT_CORE struct sk_buff_head wext_nlevents; #endif - struct net_generic *gen; + struct net_generic __rcu *gen; /* Note : following structs are cache line aligned */ #ifdef CONFIG_XFRM diff --git a/trunk/net/core/net_namespace.c b/trunk/net/core/net_namespace.c index c988e685433a..3f860261c5ee 100644 --- a/trunk/net/core/net_namespace.c +++ b/trunk/net/core/net_namespace.c @@ -42,7 +42,9 @@ static int net_assign_generic(struct net *net, int id, void *data) BUG_ON(!mutex_is_locked(&net_mutex)); BUG_ON(id == 0); - ng = old_ng = net->gen; + old_ng = rcu_dereference_protected(net->gen, + lockdep_is_held(&net_mutex)); + ng = old_ng; if (old_ng->len >= id) goto assign;