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
This commit is contained in:
dchagin 2017-03-30 19:45:07 +00:00
parent 57bf038283
commit 8660ad94c8

View File

@ -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));
}