[systemd/f21] Fix udev crash due to missing hwaddr
Michal Sekletar
msekleta at fedoraproject.org
Fri Oct 3 11:34:01 UTC 2014
commit 6544f6a8d6827311281682460a213e2e62be77ed
Author: Michal Sekletar <msekleta at redhat.com>
Date: Fri Oct 3 13:32:59 2014 +0200
Fix udev crash due to missing hwaddr
Resolves: #1126760
...void-error-when-state-restore-is-disabled.patch | 35 ++++++++++++++++++++
...nk-config-fix-crash-due-to-missing-hwaddr.patch | 35 ++++++++++++++++++++
systemd.spec | 7 +++-
3 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/0096-backlight-Avoid-error-when-state-restore-is-disabled.patch b/0096-backlight-Avoid-error-when-state-restore-is-disabled.patch
new file mode 100644
index 0000000..eec0330
--- /dev/null
+++ b/0096-backlight-Avoid-error-when-state-restore-is-disabled.patch
@@ -0,0 +1,35 @@
+From 1b0413ff4fce3739c10a51ee5eeed2e7ef2e04f3 Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl at debian.org>
+Date: Thu, 11 Sep 2014 00:49:36 +0200
+Subject: [PATCH 96/97] backlight: Avoid error when state restore is disabled
+
+When the state restore is disabled, we would print:
+"Unknown verb: load" instead of simply skipping loading the
+state.
+
+(cherry picked from commit b76388e123e8d73ded1fd53937d816b314948517)
+---
+ src/backlight/backlight.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index 4d94ebf..0a2bac6 100644
+--- a/src/backlight/backlight.c
++++ b/src/backlight/backlight.c
+@@ -372,9 +372,12 @@ int main(int argc, char *argv[]) {
+ * device probing should be complete), so that the validity
+ * check at boot time doesn't have to be reliable. */
+
+- if (streq(argv[1], "load") && shall_restore_state()) {
++ if (streq(argv[1], "load")) {
+ _cleanup_free_ char *value = NULL;
+
++ if (!shall_restore_state())
++ return EXIT_SUCCESS;
++
+ if (!validate_device(udev, device))
+ return EXIT_SUCCESS;
+
+--
+1.8.3.1
+
diff --git a/0097-udev-link-config-fix-crash-due-to-missing-hwaddr.patch b/0097-udev-link-config-fix-crash-due-to-missing-hwaddr.patch
new file mode 100644
index 0000000..66fd494
--- /dev/null
+++ b/0097-udev-link-config-fix-crash-due-to-missing-hwaddr.patch
@@ -0,0 +1,35 @@
+From ed72c7297b3749d4e15258fd8cf70efca34c6667 Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg at jklm.no>
+Date: Thu, 14 Aug 2014 01:35:16 +0200
+Subject: [PATCH 97/97] udev: link-config - fix crash due to missing hwaddr
+
+Reported by: master.nosferatu at gmail.com
+
+(cherry picked from commit eb7040ec50fbfe5aad9eaf305bd442a4a235aba)
+
+Resolves: #1126760
+---
+ src/udev/net/link-config.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
+index 5a45c53..3cc0471 100644
+--- a/src/udev/net/link-config.c
++++ b/src/udev/net/link-config.c
+@@ -247,11 +247,12 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device, link_confi
+ link_config *link;
+
+ LIST_FOREACH(links, link, ctx->links) {
++ const char* attr_value = udev_device_get_sysattr_value(device, "address");
+
+ if (net_match_config(link->match_mac, link->match_path, link->match_driver,
+ link->match_type, NULL, link->match_host,
+ link->match_virt, link->match_kernel, link->match_arch,
+- ether_aton(udev_device_get_sysattr_value(device, "address")),
++ attr_value ? ether_aton(attr_value) : NULL,
+ udev_device_get_property_value(device, "ID_PATH"),
+ udev_device_get_driver(udev_device_get_parent(device)),
+ udev_device_get_property_value(device, "ID_NET_DRIVER"),
+--
+1.8.3.1
+
diff --git a/systemd.spec b/systemd.spec
index ffd5230..360bee9 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -16,7 +16,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 215
-Release: 18%{?gitcommit:.git%{gitcommit}}%{?dist}
+Release: 19%{?gitcommit:.git%{gitcommit}}%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager
@@ -134,6 +134,8 @@ Patch092: 0092-timesyncd-check-root-distance.patch
Patch093: 0093-timesyncd-wait-before-reconnecting-to-first-server.patch
Patch094: 0094-timesyncd-allow-two-missed-replies-before-reselectin.patch
Patch095: 0095-timesyncd-don-t-reset-polling-interval-when-reselect.patch
+Patch096: 0096-backlight-Avoid-error-when-state-restore-is-disabled.patch
+Patch097: 0097-udev-link-config-fix-crash-due-to-missing-hwaddr.patch
# Presently not accepted upstream, but we disable systemd-resolved in
# the presets anyways, and this unbreaks anaconda/lorax/livecd-creator
@@ -892,6 +894,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
%{_datadir}/systemd/gatewayd
%changelog
+* Fri Oct 03 2014 Michal Sekletar <msekleta at redhat.com> - 215-19
+- Fix crash due to missing hwaddr (#1126760)
+
* Wed Oct 01 2014 Kay Sievers <kay at redhat.com> - 215-18
- revert "don't reset selinux context during CHANGE events"
More information about the scm-commits
mailing list