Skip to content
Snippets Groups Projects
Commit 7394669d authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Sasha Levin
Browse files

net/ipv4: Revert use of struct_size() helper


[ Upstream commit 4167a960 ]

Revert the use of structr_size() and stay with IP_MSFILTER_SIZE() for
now, as in this case, the size of struct ip_msfilter didn't change with
the addition of the flexible array imsf_slist_flex[]. So, if we use
struct_size() we will be allocating and calculating the size of
struct ip_msfilter with one too many items for imsf_slist_flex[].

We might use struct_size() in the future, but for now let's stay
with IP_MSFILTER_SIZE().

Fixes: 2d3e5caf ("net/ipv4: Replace one-element array with flexible-array member")
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Stable-dep-of: 5c3be3e0 ("ipmr: fix incorrect parameter validation in the ip_mroute_getsockopt() function")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1ebd0d89
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment