Skip to content

Commit

Permalink
NET: net_namespace, fix lock imbalance
Browse files Browse the repository at this point in the history
register_pernet_gen_subsys omits mutex_unlock in one fail path.
Fix it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Slaby authored and David S. Miller committed Jan 20, 2009
1 parent 518aa1b commit 357f5b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
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);
Expand Down

0 comments on commit 357f5b0

Please sign in to comment.