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: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ecd89c02da
commit
6706721d82
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user