K 10 svn:author V 6 kevans K 8 svn:date V 27 2021-01-24T03:19:38.289638Z K 7 svn:log V 740 kern: dup: do not assume oldfde is valid oldfde may be invalidated if the table has grown due to the operation that we're performing, either via fdalloc() or a direct fdgrowtable_exp(). This was technically OK before rS367927 because the old table remained valid until the filedesc became unused, but now it may be freed immediately if it's an unshared table in a single-threaded process, so it is no longer a good assumption to make. This fixes dup/dup2 invocations that grow the file table; in the initial report, it manifested as a kernel panic in devel/gmake's configure script. (cherry picked from commit f96078b8fe55c944f32c3c82ebb9c360bc155823) Git Hash: fd478d518f49084e5bc4ff3ee0ae020c8db42b9e Git Author: kevans@FreeBSD.org END