NET: net_namespace, fix lock imbalance
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>
This commit is contained in:
committed by
David S. Miller
parent
518aa1b544
commit
357f5b0b91
@@ -341,8 +341,8 @@ again:
|
|||||||
rv = register_pernet_operations(first_device, ops);
|
rv = register_pernet_operations(first_device, ops);
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
ida_remove(&net_generic_ids, *id);
|
ida_remove(&net_generic_ids, *id);
|
||||||
mutex_unlock(&net_mutex);
|
|
||||||
out:
|
out:
|
||||||
|
mutex_unlock(&net_mutex);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(register_pernet_gen_subsys);
|
EXPORT_SYMBOL_GPL(register_pernet_gen_subsys);
|
||||||
|
Reference in New Issue
Block a user