Skip to content

Commit 6706721

Browse files
edumazetdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ecd89c0 commit 6706721

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/tcp_yeah.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static struct tcp_congestion_ops tcp_yeah __read_mostly = {
221221

222222
static int __init tcp_yeah_register(void)
223223
{
224-
BUG_ON(sizeof(struct yeah) > ICSK_CA_PRIV_SIZE);
224+
BUILD_BUG_ON(sizeof(struct yeah) > ICSK_CA_PRIV_SIZE);
225225
tcp_register_congestion_control(&tcp_yeah);
226226
return 0;
227227
}

0 commit comments

Comments
 (0)