diff options
author | Eric Dumazet <edumazet@google.com> | 2021-06-29 06:52:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-29 11:54:36 -0700 |
commit | 6706721d82f86e9360c3ad5339fe3da5e0988a51 (patch) | |
tree | b3be71bd3b7d03edd4d8164ee65f7fa2f878bf9d /net/ipv4 | |
parent | ecd89c02da85f724a2d24bc5a7e28043cc24b5d7 (diff) |
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')
-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; } |