Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2018 06:03:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 227735] sched_setscheduler returns EPERM instead of EINVAL when sched_priority is out of range
Message-ID:  <bug-227735-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227735

            Bug ID: 227735
           Summary: sched_setscheduler returns EPERM instead of EINVAL
                    when sched_priority is out of range
           Product: Base System
           Version: 11.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: aliovx@gmail.com

According to the documentation of sched_setscheduler, [EINVAL] should be
returned if the value of the policy argument is invalid, or one or more
parameters contained in param is outside the valid range.

In ksched.c line 180, the ksched_setscheduler functions returns EPERM when
the check (param->sched_priority >=3D P1B_PRIO_MIN && param->sched_priority=
 <=3D
P1B_PRIO_MAX) fails, It should return EINVAL instead.

This is a minor issue, but I think it should be fixed.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227735-227>