Bug 15571

Summary: [patch] dbus_shutdown() segfault if guid-less shared connections have been used
Product: dbus Reporter: Scott James Remnant <scott>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: walters
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 16166    
Bug Blocks:    
Attachments: Patch to correct the problem
Patch in preferred format

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.