lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTinez8RX4rADp42f03AocWe2c0zimLQ7aT65nM1d@mail.gmail.com>
Date:	Thu, 3 Jun 2010 09:46:24 +0900
From:	Minchan Kim <minchan.kim@...il.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
	Oleg Nesterov <oleg@...hat.com>,
	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Nick Piggin <npiggin@...e.de>
Subject: Re: [PATCH 5/5] oom: dump_tasks() use find_lock_task_mm() too

On Thu, Jun 3, 2010 at 9:41 AM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
>> On Thu, Jun 3, 2010 at 9:06 AM, KOSAKI Motohiro
>> <kosaki.motohiro@...fujitsu.com> wrote:
>> >> > -           mm = p->mm;
>> >> > -           if (!mm) {
>> >> > -                   /*
>> >> > -                    * total_vm and rss sizes do not exist for tasks with no
>> >> > -                    * mm so there's no need to report them; they can't be
>> >> > -                    * oom killed anyway.
>> >> > -                    */
>> >>
>> >> Please, do not remove the comment for mm newbies unless you think it's useless.
>> >
>> > How is this?
>> >
>> >               task = find_lock_task_mm(p);
>> >               if (!task)
>> >                        /*
>> >                         * Probably oom vs task-exiting race was happen and ->mm
>> >                         * have been detached. thus there's no need to report them;
>> >                         * they can't be oom killed anyway.
>> >                         */
>> >                        continue;
>> >
>>
>> Looks good to adding story about racing. but my point was "total_vm
>> and rss sizes do not exist for tasks with no mm". But I don't want to
>> bother you due to trivial.
>> It depends on you. :)
>
>
> old ->mm check have two intention.
>
>   a) the task is kernel thread?
>   b) the task have alredy detached ->mm
> but a) is not strictly correct check because we should think use_mm().
> therefore we appended PF_KTHREAD check. then, here find_lock_task_mm()
> focus exiting race, I think.
>

No objection.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ