several fixes on top of 0.9.8.8
- dispatcher: fix crash while logging from signal handler (rh #1017884) - core: fix segfault in NMAgentManager (rh #1031196) - dhcp: print a warning when we can't get DHCP lease (no DHCP client s available)
This commit is contained in:
parent
a1c8949f38
commit
c81d7a693f
@ -24,7 +24,7 @@ Name: NetworkManager
|
||||
Summary: Network connection manager and user applications
|
||||
Epoch: 1
|
||||
Version: 0.9.8.8
|
||||
Release: 1%{snapshot}%{?dist}
|
||||
Release: 2%{snapshot}%{?dist}
|
||||
Group: System Environment/Base
|
||||
License: GPLv2+
|
||||
URL: http://www.gnome.org/projects/NetworkManager/
|
||||
@ -33,6 +33,9 @@ Source: %{name}-%{realversion}%{snapshot}%{git_sha}.tar.xz
|
||||
Source1: NetworkManager.conf
|
||||
Patch1: explain-dns1-dns2.patch
|
||||
Patch2: rh978435-dns-none.patch
|
||||
Patch3: rh1017884-dispatcher-crash-on-exit.patch
|
||||
Patch4: rh1031196-agent-manager-crash.patch
|
||||
Patch5: warn-no-DHCP-client.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -165,6 +168,9 @@ NetworkManager functionality from applications that use glib.
|
||||
|
||||
%patch1 -p1 -b .explain-dns1-dns2
|
||||
%patch2 -p1 -b .dns-none
|
||||
%patch3 -p1 -b .dispatcher-exit-crash
|
||||
%patch4 -p1 -b .agent-manager
|
||||
%patch5 -p1 -b .warn-no-DHCP
|
||||
|
||||
%build
|
||||
|
||||
@ -372,6 +378,11 @@ exit 0
|
||||
%{_datadir}/gtk-doc/html/libnm-util/*
|
||||
|
||||
%changelog
|
||||
* Wed Nov 20 2013 Jiří Klimeš <jklimes@redhat.com> - 1:0.9.8.8-2
|
||||
- dispatcher: fix crash while logging from signal handler (rh #1017884)
|
||||
- core: fix segfault in NMAgentManager (rh #1031196)
|
||||
- dhcp: print a warning when we can't get DHCP lease (no DHCP client s available)
|
||||
|
||||
* Thu Oct 17 2013 Dan Winship <danw@redhat.com> - 1:0.9.8.8-1
|
||||
- Updated to 0.9.8.8
|
||||
|
||||
|
90
rh1017884-dispatcher-crash-on-exit.patch
Normal file
90
rh1017884-dispatcher-crash-on-exit.patch
Normal file
@ -0,0 +1,90 @@
|
||||
From aca907fe3e3f0c7a019da4991395a93f8138a1e9 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Mon, 18 Nov 2013 23:37:58 +0100
|
||||
Subject: [PATCH] dispatcher: fix crash while logging from signal handler
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug rh#1017884 describes a crash, where dbus_init() failed, which causes
|
||||
a g_warning(). While writing the warning, a SIGTERM hit, and the
|
||||
signal_handler() tries to call again g_message().
|
||||
|
||||
The logging functions of glib are not reentrant and call abort() when
|
||||
invoked recursivly. The solution, is to use g_unix_signal_add, which
|
||||
will dispatch the handler on the mainloop asynchronously.
|
||||
|
||||
This bug is not that serious, because the dispatcher was about to
|
||||
terminate anyway. However, it gets registered as a crash by the system
|
||||
(ABRT).
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1017884
|
||||
|
||||
(cherry picked from commit 073cc01f52f8b2b6d5b20c63814dc1ed00699028)
|
||||
|
||||
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
||||
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
||||
---
|
||||
callouts/nm-dispatcher-action.c | 30 ++++++++++--------------------
|
||||
1 file changed, 10 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/callouts/nm-dispatcher-action.c b/callouts/nm-dispatcher-action.c
|
||||
index 0e4b11a..ed16a23 100644
|
||||
--- a/callouts/nm-dispatcher-action.c
|
||||
+++ b/callouts/nm-dispatcher-action.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <glib.h>
|
||||
+#include <glib-unix.h>
|
||||
#include <dbus/dbus.h>
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
#include <dbus/dbus-glib.h>
|
||||
@@ -594,27 +595,15 @@ logging_shutdown (void)
|
||||
closelog ();
|
||||
}
|
||||
|
||||
-static void
|
||||
-signal_handler (int signo)
|
||||
+static gboolean
|
||||
+signal_handler (gpointer user_data)
|
||||
{
|
||||
- if (signo == SIGINT || signo == SIGTERM) {
|
||||
- g_message ("Caught signal %d, shutting down...", signo);
|
||||
- g_main_loop_quit (loop);
|
||||
- }
|
||||
-}
|
||||
+ int signo = GPOINTER_TO_INT (user_data);
|
||||
|
||||
-static void
|
||||
-setup_signals (void)
|
||||
-{
|
||||
- struct sigaction action;
|
||||
- sigset_t mask;
|
||||
-
|
||||
- sigemptyset (&mask);
|
||||
- action.sa_handler = signal_handler;
|
||||
- action.sa_mask = mask;
|
||||
- action.sa_flags = 0;
|
||||
- sigaction (SIGTERM, &action, NULL);
|
||||
- sigaction (SIGINT, &action, NULL);
|
||||
+ g_message ("Caught signal %d, shutting down...", signo);
|
||||
+ g_main_loop_quit (loop);
|
||||
+
|
||||
+ return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -645,7 +634,8 @@ main (int argc, char **argv)
|
||||
g_option_context_free (opt_ctx);
|
||||
|
||||
g_type_init ();
|
||||
- setup_signals ();
|
||||
+ g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM));
|
||||
+ g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT));
|
||||
|
||||
if (!debug)
|
||||
logging_setup ();
|
||||
--
|
||||
1.7.11.7
|
||||
|
33
rh1031196-agent-manager-crash.patch
Normal file
33
rh1031196-agent-manager-crash.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 3227cf0ca907fa00a00d68946092990a82c11e85 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Mon, 18 Nov 2013 19:43:51 +0100
|
||||
Subject: [PATCH] core: fix segfault in NMAgentManager (rh #1031196)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1031196
|
||||
|
||||
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
||||
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
||||
---
|
||||
src/settings/nm-agent-manager.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
|
||||
index 531fabc..bf27419 100644
|
||||
--- a/src/settings/nm-agent-manager.c
|
||||
+++ b/src/settings/nm-agent-manager.c
|
||||
@@ -604,7 +604,8 @@ request_remove_agent (Request *req, NMSecretAgent *agent)
|
||||
|
||||
/* If this agent is being asked right now, cancel the request */
|
||||
if (agent == req->current) {
|
||||
- req->cancel_callback (req);
|
||||
+ if (req->cancel_callback)
|
||||
+ req->cancel_callback (req);
|
||||
req->current_has_modify = FALSE;
|
||||
req->current = NULL;
|
||||
req->current_call_id = NULL;
|
||||
--
|
||||
1.7.11.7
|
||||
|
42
warn-no-DHCP-client.patch
Normal file
42
warn-no-DHCP-client.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From c72f5ac130d58695acdc9c9664cd96d07183e339 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
|
||||
Date: Thu, 17 Oct 2013 14:39:57 +0200
|
||||
Subject: [PATCH] dhcp: print a warning when we can't get DHCP lease (no DHCP
|
||||
client s available)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
|
||||
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
||||
---
|
||||
src/dhcp-manager/nm-dhcp-manager.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c
|
||||
index 7088839..d40eb48 100644
|
||||
--- a/src/dhcp-manager/nm-dhcp-manager.c
|
||||
+++ b/src/dhcp-manager/nm-dhcp-manager.c
|
||||
@@ -554,13 +554,18 @@ nm_dhcp_manager_get_lease_config (NMDHCPManager *self,
|
||||
const char *uuid,
|
||||
gboolean ipv6)
|
||||
{
|
||||
- NMDHCPManagerPrivate *priv = NM_DHCP_MANAGER_GET_PRIVATE (self);
|
||||
+ NMDHCPManagerPrivate *priv;
|
||||
|
||||
+ g_return_val_if_fail (NM_IS_DHCP_MANAGER (self), NULL);
|
||||
g_return_val_if_fail (iface != NULL, NULL);
|
||||
g_return_val_if_fail (uuid != NULL, NULL);
|
||||
|
||||
+ priv = NM_DHCP_MANAGER_GET_PRIVATE (self);
|
||||
+
|
||||
if (priv->get_lease_config_func)
|
||||
return priv->get_lease_config_func (iface, uuid, ipv6);
|
||||
+
|
||||
+ nm_log_warn (LOGD_DHCP, "Cannot get a DHCP lease config (no usable DHCP client was found!)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.11.7
|
||||
|
Loading…
Reference in New Issue
Block a user