fix __exit_mm() dereference before check.

Dave Jones
2004-04-16T21:09:27Z

>From a quick look, it appears passing NULL mm's down to mm_release()
isn't a good idea.

Dave

--- linux-2.6.5/kernel/exit.c~ 2004-04-16 22:06:00.000000000 +0100
+++ linux-2.6.5/kernel/exit.c 2004-04-16 22:06:51.000000000 +0100
@@ -482,9 +482,10 @@
{
struct mm_struct *mm = tsk->mm;

- mm_release(tsk, mm);
if (!mm)
return;
+ mm_release(tsk, mm);
+
/*
* Serialize with any possible pending coredump.
* We must hold mmap_sem around checking core_waiters