From: Dave Young <hidave.darkstar@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org
Subject: Re: [PATCH -mm] only drop root anon_vma if not self
Date: Thu, 10 Jun 2010 09:30:12 +0800 [thread overview]
Message-ID: <AANLkTin9UTy3qSWJ8u3b1hwhnsX5NHCZNzkFbH9_-vIZ@mail.gmail.com> (raw)
In-Reply-To: <20100609211617.3e7e41bd@annuminas.surriel.com>
On Thu, Jun 10, 2010 at 9:16 AM, Rik van Riel <riel@redhat.com> wrote:
> On Wed, 9 Jun 2010 17:19:02 +0800
> Dave Young <hidave.darkstar@gmail.com> wrote:
>
>> > Manually bisected mm patches, the memleak caused by following patch:
>> >
>> > mm-extend-ksm-refcounts-to-the-anon_vma-root.patch
>>
>>
>> So I guess the refcount break, either drop-without-get or over-drop
>
> I'm guessing I did not run the kernel with enough debug options enabled
> when I tested my patches...
>
> Dave & Catalin, thank you for tracking this down.
>
> Dave, does the below patch fix your issue?
Yes, it fixed the issue. Thanks.
Tested-by: Dave Young <hidave.darkstar@gmail.com>
>
> Andrew, if the patch below works, you'll probably want to merge it as
> mm-extend-ksm-refcounts-to-the-anon_vma-root-fix.patch :)
>
> ----------------
>
> With the new anon_vma code we take a refcount on the root anon_vma.
> However, the root anon_vma does not have a refcount on itself, so
> we should not try to do a drop on itself when it is being unlinked.
>
> Signed-off-by: Rik van Riel <riel@redhat.com>
>
> --- linux-2.6-rtavma/mm/rmap.c.orig 2010-06-09 21:10:07.349376896 -0400
> +++ linux-2.6-rtavma/mm/rmap.c 2010-06-09 21:10:24.180406299 -0400
> @@ -275,7 +275,8 @@ static void anon_vma_unlink(struct anon_
>
> if (empty) {
> /* We no longer need the root anon_vma */
> - drop_anon_vma(anon_vma->root);
> + if (anon_vma->root != anon_vma)
> + drop_anon_vma(anon_vma->root);
> anon_vma_free(anon_vma);
> }
> }
>
--
Regards
dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-06-10 1:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 8:27 mmotm 2010-06-03-16-36 lots of suspected kmemleak Dave Young
2010-06-04 10:50 ` Catalin Marinas
2010-06-04 13:55 ` Dave Young
2010-06-07 5:20 ` Dave Young
2010-06-07 9:19 ` Catalin Marinas
2010-06-07 10:00 ` Dave Young
2010-06-07 16:43 ` Catalin Marinas
2010-06-08 1:37 ` Dave Young
2010-06-09 2:37 ` Dave Young
2010-06-09 2:44 ` Dave Young
2010-06-09 9:19 ` Dave Young
2010-06-10 1:16 ` [PATCH -mm] only drop root anon_vma if not self Rik van Riel
2010-06-10 1:30 ` Dave Young [this message]
2010-06-10 11:21 ` Catalin Marinas
2010-06-11 8:08 ` Dave Young
2010-06-11 9:17 ` Catalin Marinas
2010-06-11 9:30 ` Dave Young
2010-06-11 9:48 ` Dave Young
2010-06-11 10:06 ` Catalin Marinas
2010-06-12 1:50 ` Dave Young
2010-06-07 8:30 ` mmotm 2010-06-03-16-36 lots of suspected kmemleak Dave Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTin9UTy3qSWJ8u3b1hwhnsX5NHCZNzkFbH9_-vIZ@mail.gmail.com \
--to=hidave.darkstar@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox