]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tipc: simplify the finalize work queue
authorXin Long <lucien.xin@gmail.com>
Tue, 18 May 2021 02:09:08 +0000 (10:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:17 +0000 (12:45 +0100)
commit201fee25fd2018f7c31331f85ee7a2f2e3d03c52
treee277d279f676054eed68716660f864a606b8bca1
parent0e0413e3315199b23ff4aec295e256034cd0a6e4
tipc: simplify the finalize work queue

[ Upstream commit be07f056396d6bb40963c45a02951c566ddeef8e ]

This patch is to use "struct work_struct" for the finalize work queue
instead of "struct tipc_net_work", as it can get the "net" and "addr"
from tipc_net's other members and there is no need to add extra net
and addr in tipc_net by defining "struct tipc_net_work".

Note that it's safe to get net from tn->bcl as bcl is always released
after the finalize work queue is done.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 0725e6afb551 ("tipc: Fix use-after-free in tipc_mon_reinit_self().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tipc/core.c
net/tipc/core.h
net/tipc/discover.c
net/tipc/link.c
net/tipc/link.h
net/tipc/net.c