git: 6ea35ec38acf - stable/15 - fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 16 Aug 2026 02:47:02 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=6ea35ec38acf99278fae979356b9d5700c07e9d1
commit 6ea35ec38acf99278fae979356b9d5700c07e9d1
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-07-16 07:50:34 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-08-16 02:41:32 +0000
fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL
(cherry picked from commit e18844223d1eabb7e435ff9da20d88915d3f4675)
---
sys/kern/sys_procdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c
index 2a2be3f8ec69..07e431d4c381 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -716,7 +716,7 @@ fget_procdesc(struct thread *td, int pdfd, const cap_rights_t *cap_rights,
return (error);
*pfp = fp;
if (fp->f_type != DTYPE_PROCDESC)
- return (EBADF);
+ return (EINVAL);
pd = fp->f_data;
if (pp != NULL) {
p = pd->pd_proc;