git: 912f9dfca451 - main - amd64: ia32_fetch_syscall_args() does not need to check params != NULL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Apr 2026 03:24:08 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=912f9dfca451e359dda7cdf45539b7c19764f54d
commit 912f9dfca451e359dda7cdf45539b7c19764f54d
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-04-25 09:46:50 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-04-27 03:23:19 +0000
amd64: ia32_fetch_syscall_args() does not need to check params != NULL
Whatever params pointer is, it does not matter. copyin() handles any
values. In fact, params cannot be ever NULL.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56630
---
sys/amd64/ia32/ia32_syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/amd64/ia32/ia32_syscall.c b/sys/amd64/ia32/ia32_syscall.c
index c61587a93d1f..85e3d8f8e920 100644
--- a/sys/amd64/ia32/ia32_syscall.c
+++ b/sys/amd64/ia32/ia32_syscall.c
@@ -187,7 +187,7 @@ ia32_fetch_syscall_args(struct thread *td)
else
sa->callp = &p->p_sysent->sv_table[sa->code];
- if (params != NULL && sa->callp->sy_narg != 0)
+ if (sa->callp->sy_narg != 0)
error = copyin(params, (caddr_t)args,
(u_int)(sa->callp->sy_narg * sizeof(int)));
else