On Sat, May 02, 2015 at 07:27:51PM +0200, Jozsef Kadlecsik wrote: > Replace rwlock_t with spinlock_t in "struct ip_set" and change the locking > accordingly. Also, simplify the timeout routines. > > Signed-off-by: Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx> > --- [...] > diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c > index d259da3..a8e55c8 100644 > --- a/net/netfilter/ipset/ip_set_core.c > +++ b/net/netfilter/ipset/ip_set_core.c > @@ -208,15 +208,15 @@ ip_set_type_register(struct ip_set_type *type) > pr_warn("ip_set type %s, family %s with revision min %u already registered!\n", > type->name, family_name(type->family), > type->revision_min); > - ret = -EINVAL; > - goto unlock; > + ip_set_type_unlock(); > + return -EINVAL; > } > list_add_rcu(&type->list, &ip_set_type_list); > pr_debug("type %s, family %s, revision %u:%u registered.\n", > type->name, family_name(type->family), > type->revision_min, type->revision_max); > -unlock: > ip_set_type_unlock(); > + synchronize_rcu(); You don't need to call synchronize() after list_add_rcu(). -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html