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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Jul 17 17:00:22 2009 +0200

nucleus: do not dereference thread memory after deletion

---

 ksrc/nucleus/shadow.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index b632b89..3f9887b 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2236,6 +2236,7 @@ static inline void do_taskexit_event(struct task_struct 
*p)
        xnshadow_thrptd(p) = NULL;
        xnthread_archtcb(thread)->user_task = NULL;
        /* xnpod_delete_thread() -> hook -> xnshadow_unmap(). */
+       xnsched_set_resched(thread->sched);
        xnpod_delete_thread(thread);
        xnlock_put_irqrestore(&nklock, s);
        xnpod_schedule();


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to