Skip to contentSkip to conversation

NET: net_namespace, fix lock imbalance

PATCH Applied Jiri Slaby 2 participants 2 messages Jan 17, 2009 – Jan 18, 2009

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 NET: net_namespace, fix lock imbalance

register_pernet_gen_subsys omits mutex_unlock in one fail path. Fix it.

Cc David S. Miller <[email protected]>
Cc Alexey Dobriyan <[email protected]>
---
 net/core/net_namespace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/net_namespace.c +1 -1
index 55cffad..55151fa 100644
@@ -341,8 +341,8 @@ again:
 	rv = register_pernet_operations(first_device, ops);
 	if (rv < 0)
 		ida_remove(&net_generic_ids, *id);
-	mutex_unlock(&net_mutex);
 out:
+	mutex_unlock(&net_mutex);
 	return rv;
 }
 EXPORT_SYMBOL_GPL(register_pernet_gen_subsys);
Signature · 1 line
1.6.1