[PATCH roland/nptl] NPTL: Don't (re)validate sched_priority in pthread_create.
Carlos O'Donell
carlos@redhat.com
Thu Nov 20 19:50:00 GMT 2014
On 11/20/2014 01:59 PM, Roland McGrath wrote:
>>> I've written up a test for the expected EINVAL diagnosis. It depends
>>> on constructing a pthread_attr_t with invalid scheduling parameters,
>>> which AFAIK is possible only by using pthread_attr_setschedparam while
>>> the pthread_attr_t is set to one scheduling policy where a given
>>> struct sched_param is valid and then using pthread_attr_setschedpolicy
>>> to switch it to a policy where those values are invalid. This
>>> requires some assumptions about the policies and their parameters, but
>>> those are predictable enough at least for Linux.
>>
>> Should this even be possible?
>
> I can't see how it could be ruled out.
> POSIX doesn't put any requirements on the order in which you call
> pthread_attr_setschedparam and pthread_attr_setschedpolicy.
Good point.
c.
More information about the Libc-alpha
mailing list