Skip to content

Commit

Permalink
x86/process: Delete useless check for dead process with LDT
Browse files Browse the repository at this point in the history
At release_thread(), ->mm is NULL; and it is fine for the former mm to
still have an LDT. Delete this check in process_64.c, similar to
commit 2684927 ("[PATCH] x86: Deprecate useless bug"), which did the
same in process_32.c.

Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
thejh authored and KAGA-KOKO committed Jul 16, 2019
1 parent 29e7e96 commit 50e04ac
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode)

void release_thread(struct task_struct *dead_task)
{
if (dead_task->mm) {
#ifdef CONFIG_MODIFY_LDT_SYSCALL
if (dead_task->mm->context.ldt) {
pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
dead_task->comm,
dead_task->mm->context.ldt->entries,
dead_task->mm->context.ldt->nr_entries);
BUG();
}
#endif
}
WARN_ON(dead_task->mm);
}

enum which_selector {
Expand Down

0 comments on commit 50e04ac

Please sign in to comment.