Module: xenomai-forge
Branch: master
Commit: 312833bc2bb8f65246f6e170885b9fd1e7d10780
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=312833bc2bb8f65246f6e170885b9fd1e7d10780

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Aug 18 16:03:43 2014 +0200

cobalt/sched-quota: fix group deletion

---

 kernel/cobalt/sched-quota.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/sched-quota.c b/kernel/cobalt/sched-quota.c
index a5d98f4..2e0e649 100644
--- a/kernel/cobalt/sched-quota.c
+++ b/kernel/cobalt/sched-quota.c
@@ -531,7 +531,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group 
*tg,
 {
        struct xnsched_quota *qs = &tg->sched->quota;
        union xnsched_policy_param param;
-       struct xnthread *thread;
+       struct xnthread *thread, *tmp;
 
        atomic_only();
 
@@ -539,7 +539,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group 
*tg,
                if (!force)
                        return -EBUSY;
                /* Move group members to the rt class. */
-               list_for_each_entry(thread, &tg->members, quota_next) {
+               list_for_each_entry_safe(thread, tmp, &tg->members, quota_next) 
{
                        param.rt.prio = thread->cprio;
                        xnsched_set_policy(thread, &xnsched_class_rt, &param);
                }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to