Re: [PATCH] Fix check after use in kernel/exit.c

From: Ingo Molnar
Date: Sat Mar 08 2008 - 03:37:21 EST



* WANG Cong <xiyou.wangcong@xxxxxxxxx> wrote:

> mm_release won't check the mm_struct pointer, so it should be checked
> before this call.

> @@ -582,9 +582,9 @@ static void exit_mm(struct task_struct * tsk)
> {
> struct mm_struct *mm = tsk->mm;
>
> - mm_release(tsk, mm);
> if (!mm)
> return;
> + mm_release(tsk, mm);

thanks, applied. I'm wondering why this never seems to hit in practice.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/