linux-stable/net/netlink
Pedro Tammela 507182f132 net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
[ Upstream commit f4e4534850 ]

The current code for the length calculation wrongly truncates the reported
length of the groups array, causing an under report of the subscribed
groups. To fix this, use 'BITS_TO_BYTES()' which rounds up the
division by 8.

Fixes: b42be38b27 ("netlink: add API to retrieve all group memberships")
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230529153335.389815-1-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-09 10:34:03 +02:00
..
af_netlink.c net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report 2023-06-09 10:34:03 +02:00
af_netlink.h
diag.c
genetlink.c genetlink: limit the use of validation workarounds to old ops 2022-10-27 08:20:21 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
policy.c net: genl: fix error path memory leak in policy dumping 2022-08-18 10:20:48 -07:00