Unlock was missing on error path. Fixes: 95f38411df05 ("netns: use a spin_lock to protect nsid management") Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx> --- net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index a665bf490c88..cb32c0378c10 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -565,6 +565,7 @@ static int rtnl_net_newid(struct sk_buff *skb, struct nlmsghdr *nlh) spin_lock_irqsave(&nsid_lock, flags); if (__peernet2id(net, peer) >= 0) { + spin_unlock_irqrestore(&nsid_lock, flags); err = -EEXIST; goto out; } -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html