Bug 8171 - Plug file descriptor leak + handle EINTR in close()s
Summary: Plug file descriptor leak + handle EINTR in close()s
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-09-07 06:50 UTC by Kimmo Hämäläinen
Modified: 2006-09-13 22:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (9.77 KB, patch)
2006-09-07 06:51 UTC, Kimmo Hämäläinen
Details | Splinter Review
another patch for missing fclose() (637 bytes, patch)
2006-09-07 08:15 UTC, Kimmo Hämäläinen
Details | Splinter Review
plug another FD leak in dbus-spawn.c (427 bytes, patch)
2006-09-07 08:46 UTC, Kimmo Hämäläinen
Details | Splinter Review

Description Kimmo Hämäläinen 2006-09-07 06:50:54 UTC
We found a file descriptor leak (no close-on-exec set) from D-Bus.
I also noticed that many places in the code uses close() instead of
_dbus_close() -- that's bad because then EINTR is not handled.

Attaching the patch.

Note: I made the patch originally for 0.62, so it might miss something in the
trunk version.
Comment 1 Kimmo Hämäläinen 2006-09-07 06:51:51 UTC
Created attachment 6865 [details] [review]
proposed patch
Comment 2 Kimmo Hämäläinen 2006-09-07 08:15:47 UTC
Created attachment 6866 [details] [review]
another patch for missing fclose()

here is another patch for missing fclose(), although it does not have
consequences.
Comment 3 Kimmo Hämäläinen 2006-09-07 08:46:01 UTC
Created attachment 6867 [details] [review]
plug another FD leak in dbus-spawn.c

Ok, here is the last FD leak plugged. Now activated services don't inherit
leaked FDs.
Comment 4 John (J5) Palmieri 2006-09-07 11:29:34 UTC
Committed patches 1 and 3.  Patch 2 no longer applies because of the sysdep
split for unix and windows.  Can you regenerate the patch with the
--show-c-function flag.  Thanks.
Comment 5 Kimmo Hämäläinen 2006-09-08 00:12:41 UTC
(In reply to comment #4)
> Committed patches 1 and 3.  Patch 2 no longer applies because of the sysdep
> split for unix and windows.  Can you regenerate the patch with the
> --show-c-function flag.  Thanks.

Is there a tarball available for the trunk? (I have problem with CVS because of
the company firewall...)
Comment 6 John (J5) Palmieri 2006-09-08 07:44:12 UTC
If I just know what the methods are you are changing I can manually apply the patch.
Comment 7 John (J5) Palmieri 2006-09-13 22:20:42 UTC
Found the function. Closing


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.