Bug 179980 - udevstart leaks filedescriptors
udevstart leaks filedescriptors
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-04 01:02 EST by John Reiser
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-06 10:55:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2006-02-04 01:02:14 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060202 Fedora/1.5.0.1-2 Firefox/1.5.0.1

Description of problem:
/sbin/udevstart leaks filedescriptors because modalias_is_greylisted() does not call close().  A box with many multi-USB controllers and many devices per controller could overflow the filedescriptor limit.  Even on medium-sized systems, the wasted kernel overhead can be significant because it is O(n*n).

Version-Release number of selected component (if applicable):
udev-078-8

How reproducible:
Always

Steps to Reproduce:
1. strace /sbin/udevstart and watch the fd climb for open().
2. Inspect source to modalias_is_greylisted().
3.
  

Actual Results:  1. fd increases.
2.  modalias_is_greylisted() calls open(), does not call close(), and does not remember the fd for a successful open() [so no other routine can call close() reasonably.]

Expected Results:  1. fd returned by open() should not rise above 3 or 4.
2. modalias_is_greylisted() should call close().

Additional info:

Note You need to log in before you can comment on or make changes to this bug.