On Tue, 30 Jul 2024 19:04:49 +0300 Dmitry Antipov wrote:
> - unsigned int size = sizeof(struct sock_reuseport) +
> - sizeof(struct sock *) * max_socks;
> - struct sock_reuseport *reuse = kzalloc(size, GFP_ATOMIC);
> + struct sock_reuseport *reuse =
> + kzal
From: Dmitry Antipov
Date: Tue, 30 Jul 2024 19:04:49 +0300
> According to '__reuseport_alloc()', annotate trailing VLA 'sock' of
> 'struct sock_reuseport' with '__counted_by()' and use convenient
> 'struct_size()' to simplify the math used in 'kzalloc()'.
>
> Signed-off-by: Dmitry Antipov
Revie
On 30/07/24 10:04, Dmitry Antipov wrote:
According to '__reuseport_alloc()', annotate trailing VLA 'sock' of
`socks` is a flexible-array member[1], not a VLA[2].
'struct sock_reuseport' with '__counted_by()' and use convenient
'struct_size()' to simplify the math used in 'kzalloc()'. >
Sig
According to '__reuseport_alloc()', annotate trailing VLA 'sock' of
'struct sock_reuseport' with '__counted_by()' and use convenient
'struct_size()' to simplify the math used in 'kzalloc()'.
Signed-off-by: Dmitry Antipov
---
include/net/sock_reuseport.h | 2 +-
net/core/sock_reuseport.c| 7 +