Re: [PATCH v2] net: core: annotate socks of struct sock_reuseport with __counted_by

2024-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2024 07:53:46 +0300 Dmitry Antipov wrote: > + reuse = kzalloc(struct_size(reuse, socks, max_socks), GFP_ATOMIC); > > if (!reuse) another nit -- no empty lines between function call and its error check :) Two bits of docs to look at before sending v3: https://www.kernel.

[PATCH v2] net: core: annotate socks of struct sock_reuseport with __counted_by

2024-07-30 Thread Dmitry Antipov
According to '__reuseport_alloc()', annotate flexible array member '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 --- v2: style (Jakub), title and commit message (Gustavo) adjustmen