linux/net/tipc
Lin Ma 44194cb1b6 net: tipc: resize nlattr array to correct size
According to nla_parse_nested_deprecated(), the tb[] is supposed to the
destination array with maxtype+1 elements. In current
tipc_nl_media_get() and __tipc_nl_media_set(), a larger array is used
which is unnecessary. This patch resize them to a proper size.

Fixes: 1e55417d8f ("tipc: add media set to new netlink api")
Fixes: 46f15c6794 ("tipc: add media get/dump to new netlink api")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reviewed-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Link: https://lore.kernel.org/r/20230614120604.1196377-1-linma@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-06-15 14:59:17 -07:00
..
addr.c
addr.h
bcast.c
bcast.h
bearer.c net: tipc: resize nlattr array to correct size 2023-06-15 14:59:17 -07:00
bearer.h tipc: add tipc_bearer_min_mtu to calculate min mtu 2023-05-15 10:21:20 +01:00
core.c tipc: fix use-after-free Read in tipc_named_reinit 2022-06-17 11:39:10 +01:00
core.h
crypto.c tipc: Remove completion function scaffolding 2023-02-13 18:35:15 +08:00
crypto.h
diag.c
discover.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
discover.h
eth_media.c
group.c
group.h
ib_media.c
Kconfig
link.c tipc: do not update mtu if msg_max is too small in mtu negotiation 2023-05-15 10:21:20 +01:00
link.h
Makefile
monitor.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
monitor.h
msg.c
msg.h net: tipc: remove unused static inlines 2022-01-27 13:53:27 +00:00
name_distr.c net/tipc: Remove unused struct distr_queue_item 2022-09-29 18:48:32 -07:00
name_distr.h
name_table.c tipc: cleanup unused function 2022-06-17 11:43:57 +01:00
name_table.h tipc: cleanup unused function 2022-06-17 11:43:57 +01:00
net.c
net.h
netlink_compat.c string_helpers: Move string_is_valid() to the header 2023-02-09 22:30:24 -08:00
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
netlink.h
node.c tipc: fix unexpected link reset due to discovery messages 2023-01-06 12:53:10 +00:00
node.h
socket.c net: deal with most data-races in sk_wait_event() 2023-05-10 10:03:32 +01:00
socket.h
subscr.c
subscr.h
sysctl.c
topsrv.c net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
topsrv.h
trace.c
trace.h
udp_media.c tipc: add tipc_bearer_min_mtu to calculate min mtu 2023-05-15 10:21:20 +01:00
udp_media.h