diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-13 00:04:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-13 01:57:07 -0400 |
commit | 6493517eaea9b052e081e557f7c8bb06cc6b1852 (patch) | |
tree | a546f8deb8557ff14314a7e5f3edabeb03c299ab /net/ipv4/tcp_metrics.c | |
parent | 719a11cdbf57b7bdd6c87ded00fd7cb36a76a6a3 (diff) | |
download | linux-stable-6493517eaea9b052e081e557f7c8bb06cc6b1852.tar.gz linux-stable-6493517eaea9b052e081e557f7c8bb06cc6b1852.tar.bz2 linux-stable-6493517eaea9b052e081e557f7c8bb06cc6b1852.zip |
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: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r-- | net/ipv4/tcp_metrics.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index e5f41bd5ec1b..4206b14d956d 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c @@ -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"); } |