Bug 15571 - [patch] dbus_shutdown() segfault if guid-less shared connections have been used
Summary: [patch] dbus_shutdown() segfault if guid-less shared connections have been used
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on: 16166
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-17 16:06 UTC by Scott James Remnant
Modified: 2008-05-30 17:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to correct the problem (1.29 KB, patch)
2008-04-17 16:06 UTC, Scott James Remnant
Details | Splinter Review
Patch in preferred format (1.62 KB, patch)
2008-04-24 08:03 UTC, Scott James Remnant
Details | Splinter Review

Description Scott James Remnant 2008-04-17 16:06:07 UTC
Created attachment 15991 [details] [review]
Patch to correct the problem

dbus_shutdown() will segfault if guid-less shared connections have been used.  This is because references to the structure in the shared_connections_no_guid list are never removed if the connection has been disconnected from the server.

Attached patch corrects that, the slight change in locking matches the semantics for adding so I guess it's right ;)
Comment 1 Scott James Remnant 2008-04-24 08:03:16 UTC
Created attachment 16156 [details] [review]
Patch in preferred format
Comment 2 Colin Walters 2008-05-30 17:27:19 UTC
commit 0e2a099b55a50b9b5a0f948e134b5a88e2924262
Author: Colin Walters <walters@verbum.org>
Date:   Fri May 30 20:25:36 2008 -0400

    Bug 15571: Clean up GUID-less connections correctly (Scott James Remnant)
    
    	* dbus/dbus-connection.c (connection_forget_shared_unlocked):
     	Remove shared connections which lack a GUID from the list that
     	caches those, otherwise references to them will remain after
     	they have been freed.
    	* test/name-test/test-privserver-client.c: Update test to
    	try GUID-less connections too.



Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.