git: e18844223d1e - main - fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Jul 2026 07:53:33 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=e18844223d1eabb7e435ff9da20d88915d3f4675
commit e18844223d1eabb7e435ff9da20d88915d3f4675
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-07-16 07:50:34 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-07-16 07:51:18 +0000
fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
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 0dacbb1c5eac..152f24c219c9 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -713,7 +713,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;