Skip to content

Commit

Permalink
powerpc: Replace current_thread_info()->task with current
Browse files Browse the repository at this point in the history
We have a few places that use current_thread_info()->task to access
current. This won't work with THREAD_INFO_IN_TASK so fix them now.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Split out of larger patch]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Feb 23, 2019
1 parent 7306e83 commit 05b9879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,8 +1231,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
batch->active = 1;
}

if (current_thread_info()->task->thread.regs) {
restore_math(current_thread_info()->task->thread.regs);
if (current->thread.regs) {
restore_math(current->thread.regs);

/*
* The copy-paste buffer can only store into foreign real
Expand All @@ -1242,7 +1242,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
* mappings, we must issue a cp_abort to clear any state and
* prevent snooping, corruption or a covert channel.
*/
if (current_thread_info()->task->thread.used_vas)
if (current->thread.used_vas)
asm volatile(PPC_CP_ABORT);
}
#endif /* CONFIG_PPC_BOOK3S_64 */
Expand Down

0 comments on commit 05b9879

Please sign in to comment.