diff --git a/sys/kern/sys_sched.c b/sys/kern/sys_sched.c index 05b5c722f681..2bbb7a683e95 100644 --- a/sys/kern/sys_sched.c +++ b/sys/kern/sys_sched.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sched.c,v 1.13 2008/02/18 02:00:08 yamt Exp $ */ +/* $NetBSD: sys_sched.c,v 1.14 2008/02/19 09:44:26 yamt Exp $ */ /* * Copyright (c) 2008, Mindaugas Rasiukevicius @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.13 2008/02/18 02:00:08 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.14 2008/02/19 09:44:26 yamt Exp $"); #include @@ -180,8 +180,10 @@ sys__sched_setparam(struct lwp *l, const struct sys__sched_setparam_args *uap, error = kauth_authorize_process(l->l_cred, KAUTH_PROCESS_SCHEDULER_SETPARAM, p, t, KAUTH_ARG(lpolicy), KAUTH_ARG(kpri)); - if (error) + if (error) { + lwp_unlock(t); break; + } /* Set the scheduling class */ if (policy != SCHED_NONE)