rpms/NetworkManager/F-9 NetworkManager-0.7.0.99-fix-hal-resync.patch, NONE, 1.1 NetworkManager.spec, 1.253, 1.254

Daniel Williams dcbw at fedoraproject.org
Mon Mar 9 19:23:47 UTC 2009


Author: dcbw

Update of /cvs/pkgs/rpms/NetworkManager/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20100

Modified Files:
	NetworkManager.spec 
Added Files:
	NetworkManager-0.7.0.99-fix-hal-resync.patch 
Log Message:
* Mon Mar  9 2009 Dan Williams <dcbw at redhat.com> - 1:0.7.0.99-2
- Fix conflict with NetworkManager-openconnect (rh #489271)
- Fix possible crash when resynchronizing devices if HAL restarts



NetworkManager-0.7.0.99-fix-hal-resync.patch:

--- NEW FILE NetworkManager-0.7.0.99-fix-hal-resync.patch ---
commit 21defe6d73853bf19c6ce99d07701d1531e09409
Author: Drew Moseley <dmoseley at mvista.com>
Date:   Fri Mar 6 17:19:17 2009 -0500

    core: fix use-after-free caused by incorrect HAL device resync code

diff --git a/src/nm-manager.c b/src/nm-manager.c
index a6bac55..d0e5564 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1426,12 +1426,11 @@ static void
 sync_devices (NMManager *self)
 {
 	NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
-	GSList *devices;
+	GSList *devices = NULL;
 	GSList *iter;
 
-	/* Remove devices which are no longer known to HAL */
-	devices = g_slist_copy (priv->devices);
-	for (iter = devices; iter; iter = iter->next) {
+	/* Keep devices still known to HAL; get rid of ones HAL no longer knows about */
+	for (iter = priv->devices; iter; iter = iter->next) {
 		NMDevice *device = NM_DEVICE (iter->data);
 		const char *udi = nm_device_get_udi (device);
 
@@ -1440,15 +1439,14 @@ sync_devices (NMManager *self)
 				nm_device_set_managed (device, TRUE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
 			else
 				nm_device_set_managed (device, FALSE, NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
-		} else {
-			priv->devices = g_slist_delete_link (priv->devices, iter);
+			devices = g_slist_prepend (devices, device);
+		} else
 			remove_one_device (self, device);
-		}
 	}
+	g_slist_free (priv->devices);
+	priv->devices = devices;
 
-	g_slist_free (devices);
-
-	/* Get any new ones */
+	/* Ask HAL for new devices */
 	nm_hal_manager_query_devices (priv->hal_mgr);
 }
 


Index: NetworkManager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/NetworkManager/F-9/NetworkManager.spec,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -r1.253 -r1.254
--- NetworkManager.spec	5 Mar 2009 11:05:17 -0000	1.253
+++ NetworkManager.spec	9 Mar 2009 19:23:16 -0000	1.254
@@ -18,7 +18,7 @@
 Summary: Network connection manager and user applications
 Epoch: 1
 Version: 0.7.0.99
-Release: 1%{snapshot}%{?dist}
+Release: 2%{snapshot}%{?dist}
 Group: System Environment/Base
 License: GPLv2+
 URL: http://www.gnome.org/projects/NetworkManager/
@@ -29,6 +29,7 @@
 Patch1: nm-applet-internal-buildfixes.patch
 Patch2: explain-dns1-dns2.patch
 Patch3: NetworkManager-0.7.1-localhost-localdomain.patch
+Patch4: NetworkManager-0.7.0.99-fix-hal-resync.patch
 Patch10: old-dbus-glib.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -150,6 +151,7 @@
 %patch1 -p1 -b .buildfix
 %patch2 -p1 -b .explain-dns1-dns2
 %patch3 -p1 -b .keep-localhost-localdomain
+%patch4 -p1 -b .fix-hal-resync
 %patch10 -p1 -b .old-dbus-glib
 
 %build
@@ -334,6 +336,10 @@
 %{_datadir}/gtk-doc/html/libnm-util/*
 
 %changelog
+* Mon Mar  9 2009 Dan Williams <dcbw at redhat.com> - 1:0.7.0.99-2
+- Fix conflict with NetworkManager-openconnect (rh #489271)
+- Fix possible crash when resynchronizing devices if HAL restarts
+
 * Wed Mar  4 2009 Dan Williams <dcbw at redhat.com> - 1:0.7.0.99-1
 - nm: make default wired "Auto ethX" connection modifiable if an enabled system settings
     plugin supports modifying connections (rh #485555)




More information about the fedora-extras-commits mailing list