Blame SOURCES/1000-team-fix-crash-rh1856723.patch

063fa4
From a1198f4f6d95682bc4126fe4f13d8c549394d8b6 Mon Sep 17 00:00:00 2001
063fa4
From: Beniamino Galvani <bgalvani@redhat.com>
063fa4
Date: Tue, 14 Jul 2020 22:52:56 +0200
063fa4
Subject: [PATCH] team: perform cleanup immediately when connecting to teamd
063fa4
 fails
063fa4
063fa4
When NM fails to connect to teamd during an activation, it sets the
063fa4
device state to FAILED. Eventually the device will become DISCONNECTED
063fa4
and will call the ->deactivate() method that will perform the cleanup
063fa4
of timers, teamd process and teamdctl instance.
063fa4
063fa4
However, in this way, when the device is DISCONNECTED timers are still
063fa4
armed and can be triggered in the wrong state. Instead, perform the
063fa4
cleanup immediately on failure.
063fa4
063fa4
https://bugzilla.redhat.com/show_bug.cgi?id=1856723
063fa4
(cherry picked from commit 26e97fcd0d4a70e32a484d3bfc57c1802da10554)
063fa4
(cherry picked from commit 680c0b88122077101cbfd878a70d54fb7a4afcea)
063fa4
---
063fa4
 src/devices/team/nm-device-team.c | 1 +
063fa4
 1 file changed, 1 insertion(+)
063fa4
063fa4
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
063fa4
index 217c4bdd7c..7ba3034212 100644
063fa4
--- a/src/devices/team/nm-device-team.c
063fa4
+++ b/src/devices/team/nm-device-team.c
063fa4
@@ -371,6 +371,7 @@ teamd_ready (NMDeviceTeam *self)
063fa4
 		success = teamd_read_config (self);
063fa4
 
063fa4
 	if (!success) {
063fa4
+		teamd_cleanup (self, TRUE);
063fa4
 		nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED);
063fa4
 		return;
063fa4
 	}
063fa4
-- 
063fa4
2.26.2
063fa4