From faa9679e248c939fd011679620ded0379d8cc340 Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Thu, 30 Mar 2017 19:45:07 +0000 Subject: [PATCH] Use kern_mincore() helper instead of abusing syscall entry. Suggested by: kib@ Reviewed by: kib@ MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10143 --- sys/compat/linux/linux_misc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index a660928795b..9db1767e7c4 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -2538,13 +2538,9 @@ linux_getrandom(struct thread *td, struct linux_getrandom_args *args) int linux_mincore(struct thread *td, struct linux_mincore_args *args) { - struct mincore_args bsd_args; /* Needs to be page-aligned */ if (args->start & PAGE_MASK) return (EINVAL); - bsd_args.addr = PTRIN(args->start); - bsd_args.len = args->len; - bsd_args.vec = args->vec; - return (sys_mincore(td, &bsd_args)); + return (kern_mincore(td, args->start, args->len, args->vec)); }