1. 16 Mar, 2018 1 commit
    • Philippe Gerum's avatar
      copperplate/threadobj: fix NULL dereference in threadobj_unblock() · 945c7dbf
      Philippe Gerum authored
      threadobj_unblock() simply does not work, dereferencing a NULL pointer
      whenever it actually manages to unblock a thread waiting on a
      synchronization object.
      
      Calling syncobj_flush() on this object to wake up waiters zeroes the
      wait_sobj field in the corresponding TCBs, so don't dereference
      thobj->wait_sobj past this point.
      
      Thread 1 "main" received signal SIGSEGV, Segmentation fault.
      0x00007ffff79aeda0 in __syncobj_tag_unlocked (sobj=0x0) at include/copperplate/syncobj.h:100
      100		assert(sobj->flags & SYNCOBJ_LOCKED);
      (gdb) bt
      945c7dbf
  2. 14 Mar, 2018 1 commit
    • Jan Kiszka's avatar
      cobalt/thread: Move tcb clearing into __xnthread_init · 05019431
      Jan Kiszka authored and Philippe Gerum's avatar Philippe Gerum committed
      
      
      This both de-duplicates the code and ensures that all fields are zeroed
      prior to calling one of the actual tcb initialization functions.
      Specifically if host_task is not properly cleaned, we may cause a bug
      when using the field earlier, e.g.
      
      general protection fault: 0000 [#1] PREEMPT SMP
      [...]
      RIP: 0010:[<ffffffff81185a3c>]  [<ffffffff81185a3c>] xnthread_host_pid+0x1c/0x30
      [..]
      Call Trace:
       [<ffffffff8117c987>] trace_event_raw_event_cobalt_thread_set_current_prio+0x57/0xa0
       [<ffffffff8117f33d>] xnsched_set_effective_priority+0x8d/0xc0
       [<ffffffff8117a1e4>] xnsched_rt_setparam+0x14/0x30
       [<ffffffff8117e700>] xnsched_set_policy+0xc0/0x170
       [<ffffffff81185687>] __xnthread_init+0x317/0x3d0
       [<ffffffff8114a3e8>] ? trace_buffer_unlock_commit+0x58/0x70
       [<ffffffff811857bb>] xnthread_init+0x7b/0x110
      Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
      05019431
  3. 10 Mar, 2018 2 commits
  4. 08 Mar, 2018 25 commits
  5. 27 Feb, 2018 1 commit
  6. 26 Feb, 2018 1 commit
  7. 20 Feb, 2018 8 commits
  8. 05 Feb, 2018 1 commit