1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

procstat_getfiles_sysctl: do not require non-null ki_fd

ki_fd is legitimately NULL when 32bit process requests process data
from 64bit host kernel.  The field is not used by the code for sysctl
case;  procstat_getfiles_kvm() checks ki_fd.

PR:	260174
Reported by:	Damjan Jovanovic <damjan.jov@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2021-12-02 20:03:01 +02:00
parent 0ea3e4a27b
commit 7a9423d6f3

View File

@ -865,8 +865,6 @@ procstat_getfiles_sysctl(struct procstat *procstat, struct kinfo_proc *kp,
cap_rights_t cap_rights;
assert(kp);
if (kp->ki_fd == NULL)
return (NULL);
switch (procstat->type) {
case PROCSTAT_SYSCTL:
files = kinfo_getfile(kp->ki_pid, &cnt);