i386 virtualization - Remove some dead debugging code
PATCH 2/6 i386 virtualization - Remove some dead debugging code
This code is quite dead. Release_thread is always guaranteed that the mm has already been released, thus dead_task->mm will always be NULL.
arch/i386/kernel/process.c +1 -11
@@ -421,17 +421,7 @@void release_thread (struct task_struct *dead_task) { -if (dead_task->mm) { -// temporary debugging check -if (dead_task->mm->context.size) { -printk ("WARNING: dead process %8s still has LDT? <%p/%d>\n" , - dead_task->comm, - dead_task->mm->context.ldt, - dead_task->mm->context.size); -BUG (); - } - } - +BUG_ON (dead_task->mm);release_vm86_irqs (dead_task); }
Quoted 14 lines · * [email protected] ([email protected]) wrote:
This code is quite dead.
Release_threadis always guaranteed that the mm has already been released, thusdead_task->mmwill always be NULL.Signed-off-by Zachary Amsden <[email protected]>Index:
linux-2.6.13/arch/i386/kernel/process.c
===================================================================arch/i386/kernel/process.c +0
-2@@ -421,17 +421,7 @@void release_thread (struct task_struct *dead_task) { -if (dead_task->mm) { -// temporary debugging check
arch/i386/kernel/process.c line 424
Quoted 10 lines
arch/i386/kernel/process.c +1
-9-if (dead_task->mm->context.size) { -printk ("WARNING: dead process %8s still has LDT? <%p/%d>\n" , - dead_task->comm, - dead_task->mm->context.ldt, - dead_task->mm->context.size); -BUG (); - } - } - +BUG_ON (dead_task->mm);
This BUG_ON() has different semantics than old dead one. Is there a point? exit_mm() has already reset this to NULL, no?
Quoted 2 lines
arch/i386/kernel/process.c +0
-0release_vm86_irqs (dead_task); }
Quoted 24 lines · Chris Wright
Quoted 21 lines · * [email protected] ([email protected]) wrote:
This code is quite dead.
Release_threadis always guaranteed that the mm has already been released, thusdead_task->mmwill always be NULL.Signed-off-by Zachary Amsden <[email protected]>Index:
linux-2.6.13/arch/i386/kernel/process.c
===================================================================arch/i386/kernel/process.c +0
-9@@ -421,17 +421,7 @@void release_thread (struct task_struct *dead_task) { -if (dead_task->mm) { -// temporary debugging check -if (dead_task->mm->context.size) { -printk ("WARNING: dead process %8s still has LDT? <%p/%d>\n" , - dead_task->comm, - dead_task->mm->context.ldt, - dead_task->mm->context.size); -BUG (); - }
Quoted 10 lines
arch/i386/kernel/process.c
Quoted 5 lines
arch/i386/kernel/process.c +1
-2- } - +BUG_ON (dead_task->mm);This
BUG_ON()has different semantics than old dead one. Is there a point?exit_mm()has already reset this to NULL, no?
Yes, completely. This BUG() could be eliminated entirely, as trivial inspection shows. I can't fathom a single reason why it should still exist, but the presence of it in the first place made be wonder if there may be some erudite reason for it. Thus I raised the BUG to a higher power - obviously the LDT is gone if the MM is gone.
Zach