Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43faa6e

Browse files
authored
Merge pull request torvalds#334 from laijs/lkl/set-host-task-id-when-reuse
always set the ti->tid when reuse host task
2 parents 5b3fcd5 + e9e4998 commit 43faa6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/lkl/kernel/threads.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ int host_task_stub(void *unused)
133133

134134
void switch_to_host_task(struct task_struct *task)
135135
{
136-
if (current == task)
137-
return;
138-
139136
if (WARN_ON(!test_tsk_thread_flag(task, TIF_HOST_THREAD)))
140137
return;
141138

142139
task_thread_info(task)->tid = lkl_ops->thread_self();
143140

141+
if (current == task)
142+
return;
143+
144144
wake_up_process(task);
145145
thread_sched_jb();
146146
lkl_ops->sem_down(task_thread_info(task)->sched_sem);

0 commit comments

Comments
 (0)