WSL2-Linux-Kernel/net/tipc
Fedor Pchelkin de52e17326 tipc: stop tipc crypto on failure in tipc_node_create
If tipc_link_bc_create() fails inside tipc_node_create() for a newly
allocated tipc node then we should stop its tipc crypto and free the
resources allocated with a call to tipc_crypto_start().

As the node ref is initialized to one to that point, just put the ref on
tipc_link_bc_create() error case that would lead to tipc_node_free() be
eventually executed and properly clean the node and its crypto resources.

Found by Linux Verification Center (linuxtesting.org).

Fixes: cb8092d70a ("tipc: move bc link creation back to tipc_node_create")
Suggested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/20230725214628.25246-1-pchelkin@ispras.ru
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-07-27 11:45:05 +02:00
..
Kconfig
Makefile
addr.c
addr.h
bcast.c
bcast.h
bearer.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-15 22:19:41 -07:00
bearer.h tipc: delete tipc_mtu_bad from tipc_udp_enable 2023-05-31 00:01:11 -07:00
core.c
core.h
crypto.c tipc: check return value of pskb_trim() 2023-07-27 10:46:05 +02: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
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
monitor.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
monitor.h
msg.c
msg.h
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
name_table.h
net.c
net.h
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
netlink.h
netlink_compat.c string_helpers: Move string_is_valid() to the header 2023-02-09 22:30:24 -08:00
node.c tipc: stop tipc crypto on failure in tipc_node_create 2023-07-27 11:45:05 +02:00
node.h
socket.c sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07: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: delete tipc_mtu_bad from tipc_udp_enable 2023-05-31 00:01:11 -07:00
udp_media.h