From ff434af2c5eceb7ebc2aaffb154ceb39f7b857bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 8 Sep 2015 09:46:56 +0200 Subject: [PATCH] device: fix a crash when VLAN fails to realize Program received signal SIGSEGV, Segmentation fault. 0x0000555555646b59 in platform_link_added (self=self@entry=0x5555559fe1d0, ifindex=, plink=plink@entry=0x555555b10a70) at nm-manager.c:1889 1889 nm_log_warn (LOGD_HW, "%s: factory failed to create device: %s", (gdb) bt #0 0x0000555555646b59 in platform_link_added (self=self@entry=0x5555559fe1d0, ifindex=, plink=plink@entry=0x555555b10a70) at nm-manager.c:1889 #1 0x000055555564980c in nm_manager_start (self=0x5555559fe1d0) at nm-manager.c:1988 #2 0x000055555564980c in nm_manager_start (self=0x5555559fe1d0, error=error@entry=0x7fffffffe658) at nm-manager.c:4212 #3 0x00005555555ae173 in main (argc=1, argv=0x7fffffffe7c8) at main.c:428 (gdb) --- src/devices/nm-device-vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index a4117f03a6..59c2e47ce3 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -155,6 +155,8 @@ realize (NMDevice *device, parent = nm_manager_get_device_by_ifindex (nm_manager_get (), parent_ifindex); if (!parent) { nm_log_dbg (LOGD_HW, "(%s): VLAN parent interface unknown", plink->name); + g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, + "(%s): VLAN parent interface unknown", plink->name); return FALSE; } } else