diff options
author | Eric Dumazet <edumazet@google.com> | 2021-06-29 15:52:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-29 20:54:36 +0200 |
commit | 6706721d82f86e9360c3ad5339fe3da5e0988a51 (patch) | |
tree | b3be71bd3b7d03edd4d8164ee65f7fa2f878bf9d /net/ipv4/tcp_yeah.c | |
parent | gve: DQO: Fix off by one in gve_rx_dqo() (diff) | |
download | linux-6706721d82f86e9360c3ad5339fe3da5e0988a51.tar.xz linux-6706721d82f86e9360c3ad5339fe3da5e0988a51.zip |
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>
Diffstat (limited to 'net/ipv4/tcp_yeah.c')
-rw-r--r-- | net/ipv4/tcp_yeah.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 3bb448761ca3..07c4c93b9fdb 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c @@ -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; } |