Commit 6706721d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp_yeah: check struct yeah size at compile time

Compiler can perform the sanity check instead of waiting
to load the module and crash the host.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ecd89c02
......@@ -221,7 +221,7 @@ static struct tcp_congestion_ops tcp_yeah __read_mostly = {
static int __init tcp_yeah_register(void)
{
BUG_ON(sizeof(struct yeah) > ICSK_CA_PRIV_SIZE);
BUILD_BUG_ON(sizeof(struct yeah) > ICSK_CA_PRIV_SIZE);
tcp_register_congestion_control(&tcp_yeah);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment