Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Dec 2021 18:05:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 260174] libprocstat's i386 procstat_getfiles() fails on amd64
Message-ID:  <bug-260174-227-hFGJpbw98W@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-260174-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-260174-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260174

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
The following should fix it, I did not checked:

diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index b754bc568e99..850d37598423 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -865,9 +865,7 @@ procstat_getfiles_sysctl(struct procstat *procstat, str=
uct
kinfo_proc *kp,
        cap_rights_t cap_rights;

        assert(kp);
-       if (kp->ki_fd =3D=3D NULL)
-               return (NULL);
-       switch(procstat->type) {
+       switch (procstat->type) {
        case PROCSTAT_SYSCTL:
                files =3D kinfo_getfile(kp->ki_pid, &cnt);
                break;

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260174-227-hFGJpbw98W>