From 261132097e647d259c851b32c3c5798fa13cc67a Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 3 Mar 2013 12:55:08 -0500 Subject: udev: fix segfault with android rndis The android gadget driver for network tethering over rndis somehow has a parent device with a null subsystem. Probably this is bug in android driver, but it is easy enough to make systemd/udev behave gracefully and not segfault. And this will help for making linux distros with systemd (like fedora) work on android devices. Signed-off-by: Anthony G. Basile --- src/udev/udev-builtin-net_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index ca1f12fb28..36eec5aec0 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -253,7 +253,7 @@ static int names_pci(struct udev_device *dev, struct netnames *names) { if (!parent) return -ENOENT; /* check if our direct parent is a PCI device with no other bus in-between */ - if (streq("pci", udev_device_get_subsystem(parent))) { + if (streq_ptr("pci", udev_device_get_subsystem(parent))) { names->type = NET_PCI; names->pcidev = parent; } else { -- cgit v1.2.3-54-g00ecf