A memcpy() operation is not copying the proper sched info for later setting. This results in pthread_setschedparam returning the error code 22 (EINVAL) because it is operating on junk data.

Regards
-steve
Index: exec/logsys.c
===================================================================
--- exec/logsys.c       (revision 2905)
+++ exec/logsys.c       (working copy)
@@ -1599,7 +1599,7 @@
 #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
        if (wthread_active == 0) {
                logsys_sched_policy = policy;
-               memcpy(&logsys_sched_param, &param, sizeof(struct sched_param));
+               memcpy(&logsys_sched_param, param, sizeof(struct sched_param));
                logsys_sched_param_queued = 1;
        } else {
                res = pthread_setschedparam (logsys_thread_id, policy, param);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to