Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f97e455a authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

tipc: use RTNL lock to protect tipc_net_stop routine



As the tipc network initialization(ie, tipc_net_start routine) is
under RTNL protection, its corresponding deinitialization part(ie,
tipc_net_stop routine) should be protected by RTNL too.

Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Tested-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca07fb07
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -195,11 +195,13 @@ void tipc_net_stop(void)
		return;
		return;


	tipc_nametbl_withdraw(TIPC_CFG_SRV, tipc_own_addr, 0, tipc_own_addr);
	tipc_nametbl_withdraw(TIPC_CFG_SRV, tipc_own_addr, 0, tipc_own_addr);
	rtnl_lock();
	write_lock_bh(&tipc_net_lock);
	write_lock_bh(&tipc_net_lock);
	tipc_bearer_stop();
	tipc_bearer_stop();
	tipc_bclink_stop();
	tipc_bclink_stop();
	tipc_node_stop();
	tipc_node_stop();
	write_unlock_bh(&tipc_net_lock);
	write_unlock_bh(&tipc_net_lock);
	rtnl_unlock();


	pr_info("Left network mode\n");
	pr_info("Left network mode\n");
}
}