diff options
author | mjg <mjg@FreeBSD.org> | 2014-01-07 19:28:10 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2014-01-07 19:28:10 +0000 |
commit | 759bcf6814b3dd4f0739a000f5b2f399804eb5b1 (patch) | |
tree | 4cd79d6071856f96764f6221b09939c495dffa5d /sys/kern | |
parent | daf195b13f0834494738bf0f4b3b65350beb0f3b (diff) | |
download | FreeBSD-src-759bcf6814b3dd4f0739a000f5b2f399804eb5b1.zip FreeBSD-src-759bcf6814b3dd4f0739a000f5b2f399804eb5b1.tar.gz |
MFC r260232:
Don't check for fd limits in fdgrowtable_exp.
Callers do that already and additional check races with process
decreasing limits and can result in not growing the table at all, which
is currently not handled.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_descrip.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c1f0d38..8210e45 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1482,18 +1482,13 @@ filecaps_validate(const struct filecaps *fcaps, const char *func) static void fdgrowtable_exp(struct filedesc *fdp, int nfd) { - int nfd1, maxfd; + int nfd1; FILEDESC_XLOCK_ASSERT(fdp); nfd1 = fdp->fd_nfiles * 2; if (nfd1 < nfd) nfd1 = nfd; - maxfd = getmaxfd(curproc); - if (maxfd < nfd1) - nfd1 = maxfd; - KASSERT(nfd <= nfd1, - ("too low nfd1 %d %d %d %d", nfd, fdp->fd_nfiles, maxfd, nfd1)); fdgrowtable(fdp, nfd1); } |