]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: core: annotate socks of struct sock_reuseport with __counted_by
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 1 Aug 2024 14:23:11 +0000 (17:23 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Aug 2024 00:16:59 +0000 (17:16 -0700)
commitf94074687d05aea10b50c4f4055a19d9d0c3bd27
treed95db90595b4d8a5e70ebe7f5d8dd3e62c343038
parent6555a2a9212be6983d2319d65276484f7c5f431a
net: core: annotate socks of struct sock_reuseport with __counted_by

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 <dmantipov@yandex.ru>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20240801142311.42837-1-dmantipov@yandex.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sock_reuseport.h
net/core/sock_reuseport.c