In the compat setitimer(2) calls, don't validate which timer is being
used since dosetitimer() does this anyway. The compat functions hadn't been updated since ITIMER_MONOTONIC was introduced, so they reported that that ITIMER_MONOTONIC timer was invalid.
This commit is contained in:
parent
074bc0cd1a
commit
a6c0d32ea0
sys/compat/netbsd32
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32_compat_50.c,v 1.50 2021/01/19 03:20:13 simonb Exp $ */
|
||||
/* $NetBSD: netbsd32_compat_50.c,v 1.51 2021/02/18 12:54:03 simonb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.50 2021/01/19 03:20:13 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.51 2021/02/18 12:54:03 simonb Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -875,8 +875,6 @@ compat_50_netbsd32_setitimer(struct lwp *l,
|
||||
struct itimerval aitv;
|
||||
int error;
|
||||
|
||||
if ((u_int)which > ITIMER_PROF)
|
||||
return EINVAL;
|
||||
itv32 = SCARG_P32(uap, itv);
|
||||
if (itv32) {
|
||||
if ((error = copyin(itv32, &s32it, sizeof(s32it))))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32_time.c,v 1.54 2021/01/19 03:20:13 simonb Exp $ */
|
||||
/* $NetBSD: netbsd32_time.c,v 1.55 2021/02/18 12:54:03 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.54 2021/01/19 03:20:13 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.55 2021/02/18 12:54:03 simonb Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ntp.h"
|
||||
@ -142,8 +142,6 @@ netbsd32___setitimer50(struct lwp *l, const struct netbsd32___setitimer50_args *
|
||||
struct itimerval aitv;
|
||||
int error;
|
||||
|
||||
if ((u_int)which > ITIMER_PROF)
|
||||
return EINVAL;
|
||||
itv32 = SCARG_P32(uap, itv);
|
||||
if (itv32) {
|
||||
if ((error = copyin(itv32, &s32it, sizeof(s32it))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user