diff options
author | ian <ian@FreeBSD.org> | 2013-01-30 15:21:18 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2013-01-30 15:21:18 +0000 |
commit | 3e5ced1b98dca63d150904313752d2ee1cf72802 (patch) | |
tree | 2ce15a473ba5efbc5ea34e56595a5f26d1936120 /sys/dev/usb/controller/avr32dci.c | |
parent | e7ca48d15b0d2114430b38f3d1cd793d3e50a3ae (diff) | |
download | FreeBSD-src-3e5ced1b98dca63d150904313752d2ee1cf72802.zip FreeBSD-src-3e5ced1b98dca63d150904313752d2ee1cf72802.tar.gz |
Fix a descriptor leak in devd. Clients reading /var/run/devd.pipe can close
their socket connection any time, and devd only notices that when it gets an
error trying to write an event to the client. On a system with no device
change activity, clients could connect and disappear repeatedly without devd
noticing, leading to an ever-growing list of open socket descriptors in devd.
Now devd uses poll(2) looking for POLLHUP on all existing clients every time
a new client connection is established, and also periodically (once a minute)
to proactively find zombie clients and reap the socket descriptors. It also
now has a connection limit, configurable with a new -l <num> command line arg.
When the maximum number of connections is reached it stops accepting new
connections until some current clients drop off.
Reviewed by: imp
Approved by: cognet (mentor)
Diffstat (limited to 'sys/dev/usb/controller/avr32dci.c')
0 files changed, 0 insertions, 0 deletions