Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6493517e authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

tcp_metrics: panic when tcp_metrics_init fails.



There is not a practical way to cleanup during boot so
just panic if there is a problem initializing tcp_metrics.

That will at least give us a clear place to start debugging
if something does go wrong.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 719a11cd
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -1175,16 +1175,10 @@ void __init tcp_metrics_init(void)

	ret = register_pernet_subsys(&tcp_net_metrics_ops);
	if (ret < 0)
		goto cleanup;
		panic("Could not allocate the tcp_metrics hash table\n");

	ret = genl_register_family_with_ops(&tcp_metrics_nl_family,
					    tcp_metrics_nl_ops);
	if (ret < 0)
		goto cleanup_subsys;
	return;

cleanup_subsys:
	unregister_pernet_subsys(&tcp_net_metrics_ops);

cleanup:
	return;
		panic("Could not register tcp_metrics generic netlink\n");
}