x86/process: Delete useless check for dead process with LDT
PATCH 1/1 x86/process: Delete useless check for dead process with LDT
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 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the same in process_32.c.
--- arch/x86/kernel/process_64.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
arch/x86/kernel/process_64.c +1 -11
@@ -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 {
Signature · 1 line
2.22.0.510.g264f2c817a-goog
tip-bot for Jann Horn
merge botx86/process: Delete useless check for dead process with LDT
Commit-ID: 68c2976d7d93392d33ccd8871e9e61b33b5e640f Gitweb: https://git.kernel.org/tip/68c2976d7d93392d33ccd8871e9e61b33b5e640f Author: Jann Horn <[email protected]> AuthorDate: Sat, 13 Jul 2019 00:41:52 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Tue, 16 Jul 2019 23:13:50 +0200
x86/process: Delete useless check for dead process with LDT
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 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the same in process_32.c.
--- arch/x86/kernel/process_64.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
arch/x86/kernel/process_64.c +1 -11
@@ -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 {
tip-bot for Jann Horn
merge botx86/process: Delete useless check for dead process with LDT
Commit-ID: 50e04acf2990d0d93983720b0a85b11ef805df60 Gitweb: https://git.kernel.org/tip/50e04acf2990d0d93983720b0a85b11ef805df60 Author: Jann Horn <[email protected]> AuthorDate: Sat, 13 Jul 2019 00:41:52 +0200 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 17 Jul 2019 00:42:27 +0200
x86/process: Delete useless check for dead process with LDT
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 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the same in process_32.c.
--- arch/x86/kernel/process_64.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
arch/x86/kernel/process_64.c +1 -11
@@ -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 {