mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-13 01:30:26 +01:00
manager: fix race condition when resuming from sleep
If the device state change (to disconnected or unmanaged) triggered by a sleep event happens after the wake, the devices becomes wrongly unmanaged and it's necessary to manually manage it again, or restart NM. During the wake event we should disconnect the device_sleep_cb() callback for all devices because we don't want to react to state changes anymore; in particular we don't need to detect when the device becomes disconnected to unmanage it. (cherry picked from commitfe2d93980b) (cherry picked from commit971897195a) (cherry picked from commit7913275b02)
This commit is contained in:
parent
da54b35af3
commit
6d0e8a2acf
1 changed files with 2 additions and 1 deletions
|
|
@ -5993,8 +5993,9 @@ do_sleep_wake (NMManager *self, gboolean sleeping_changed)
|
|||
} else {
|
||||
_LOGD (LOGD_SUSPEND, "sleep: %s...", waking_from_suspend ? "waking up" : "re-enabling");
|
||||
|
||||
sleep_devices_clear (self);
|
||||
|
||||
if (waking_from_suspend) {
|
||||
sleep_devices_clear (self);
|
||||
c_list_for_each_entry (device, &priv->devices_lst_head, devices_lst) {
|
||||
if (nm_device_is_software (device))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue