Re: [PATCH] exit: fix oops in sync_mm_rss

From: Minchan Kim
Date: Tue Mar 30 2010 - 22:54:45 EST


On Wed, Mar 31, 2010 at 11:12 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> On Wed, 31 Mar 2010 10:57:18 +0900
> Minchan Kim <minchan.kim@xxxxxxxxx> wrote:
>
>> On Wed, Mar 31, 2010 at 9:41 AM, KAMEZAWA Hiroyuki
>
>> > Doesn't make sense ?
>> >
>>
>> Nitpick.
>> How about moving sync_mm_rss into after check !mm of exit_mm?
>>
> Hmm.
> ==
> Â Â Â Âsync_mm_rss(tsk, tsk->mm);
> Â Â Â Âgroup_dead = atomic_dec_and_test(&tsk->signal->live);
> Â Â Â Âif (group_dead) {
> Â Â Â Â Â Â Â Âhrtimer_cancel(&tsk->signal->real_timer);
> Â Â Â Â Â Â Â Âexit_itimers(tsk->signal);
> Â Â Â Â Â Â Â Âif (tsk->mm)
> Â Â Â Â Â Â Â Â Â Â Â Âsetmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm); ---(**)
> Â Â Â Â}
> Â Â Â Âacct_collect(code, group_dead);
> Â Â Â Âif (group_dead)
> Â Â Â Â Â Â Â Âtty_audit_exit();
> Â Â Â Âif (unlikely(tsk->audit_context))
> Â Â Â Â Â Â Â Âaudit_free(tsk);
>
> Â Â Â Âtsk->exit_code = code;
> Â Â Â Âtaskstats_exit(tsk, group_dead); --------(*)
>
> Â Â Â Âexit_mm(tsk);
> ==
> task_acct routine has to handle mm information (*).

Indeed. I missed that.
Thanks, Kame.


--
Kind regards,
Minchan Kim
--
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/