aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_ioctl.h
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2013-01-30 15:21:18 +0000
committerIan Lepore <ian@FreeBSD.org>2013-01-30 15:21:18 +0000
commite1334f935fbf45bf31da6c900569ecea668206c9 (patch)
tree2ce15a473ba5efbc5ea34e56595a5f26d1936120 /sys/dev/usb/usb_ioctl.h
parent96c95412cafecdd39aaf1539ce712e4a24975c52 (diff)
downloadsrc-e1334f935fbf45bf31da6c900569ecea668206c9.tar.gz
src-e1334f935fbf45bf31da6c900569ecea668206c9.zip
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)
Notes
Notes: svn path=/head/; revision=246121
Diffstat (limited to 'sys/dev/usb/usb_ioctl.h')
0 files changed, 0 insertions, 0 deletions