]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: make Link and NetDev always have the valid poiter to Manager
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Jan 2019 15:30:37 +0000 (00:30 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Jan 2019 13:48:53 +0000 (14:48 +0100)
commit9e2bbf9915255770836d16cd99eeb6536297079d
tree9433c4c5187678f0229e88a077fc5fd03ff7e8dd
parent50198038c89ae5ed5f8ea1288b61e4ab44cb3cdf
network: make Link and NetDev always have the valid poiter to Manager

c4397d94c3d94909188d82e086ebedf5d3690569 introduces
link_detach_from_manager() and netdev_detach_from_manager(), and they
set Link::manager or NetDev::manager NULL.
But, at the time e.g. link is removed, hence link_drop() is called,
there may be still some asynchronous netlink call is waiting, and
their callbacks hit assertion.

This make {link,netdev}_detach_from_manager() just drop all references
from manager, but keep the pointer to manager.

Fixes #11411.
src/network/netdev/netdev.c
src/network/netdev/netdev.h
src/network/netdev/wireguard.c
src/network/networkd-link.c