[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/17507 CVS commit: src/sys/kern
The following reply was made to PR kern/17507; it has been noted by GNATS.
From: David Laight <dsl%netbsd.org@localhost>
Subject: PR/17507 CVS commit: src/sys/kern
Date: Sat, 12 Dec 2009 17:47:05 +0000
Module Name: src
Committed By: dsl
Date: Sat Dec 12 17:47:05 UTC 2009
Bounding the 'nfds' arg to poll() at the current process limit for actual
open files is rather gross - the poll map isn't required to be dense.
Instead limit to a much larger value (1000 + dt_nfiles) so that user
programs cannot allocate indefinite sized blocks of kvm.
If the limit is exceeded, then return EINVAL instead of silently truncating
(The silent truncation in select isn't quite as bad - although even there
any high bits that are set ought to generate an EBADF response.)
Move the code that converts ERESTART and EWOULDBLOCK into common code.
Effectively fixes PR/17507 since the new limit is unlikely to be detected.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/sys_select.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |