]> git.itanic.dy.fi Git - linux-stable/commit
net/net_namespace: Check the return value of register_pernet_subsys()
authorAditya Pakki <pakki001@umn.edu>
Mon, 24 Dec 2018 01:42:38 +0000 (19:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:27:01 +0000 (15:27 +0100)
commit88b903fedb6d43443a80a7033b17e0424f072ccc
treeff90516b54e2f5c7b2a7ae84192b3a11f7bd3d5f
parent0df349316d149a002a2996e59374d0c75e4b95e2
net/net_namespace: Check the return value of register_pernet_subsys()

[ Upstream commit 0eb987c874dc93f9c9d85a6465dbde20fdd3884c ]

In net_ns_init(), register_pernet_subsys() could fail while registering
network namespace subsystems. The fix checks the return value and
sends a panic() on failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/net_namespace.c