From: Robin Holt <holt@sgi.com>
To: linux-mm@kvack.org, Andrea Arcangeli <andrea@qumranet.com>
Cc: Nick Piggin <npiggin@suse.de>,
Christoph Lameter <cl@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: [Patch] mmu_notifiers destroyed by __mmu_notifier_release() retain extra mm_count.
Date: Thu, 5 Feb 2009 11:23:03 -0600 [thread overview]
Message-ID: <20090205172303.GB8559@sgi.com> (raw)
An application relying upon mmu_notifier_release for teardown of the
mmu_notifiers will leak mm_structs. At the do_mmu_notifier_register
increments mm_count, but __mmu_notifier_release() does not decrement it.
Signed-off-by: Robin Holt <holt@sgi.com>
CC: Stable kernel maintainers <stable@vger.kernel.org>
---
I detected this while running a 2.6.27 kernel. Could this get added to
the stable trees when accepted as well? It does cause a denial of
service with OOM.
mm/mmu_notifier.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.27/mm/mmu_notifier.c
===================================================================
--- linux-2.6.27.orig/mm/mmu_notifier.c 2008-10-09 17:13:53.000000000 -0500
+++ linux-2.6.27/mm/mmu_notifier.c 2009-02-05 10:55:07.076561592 -0600
@@ -61,6 +61,7 @@ void __mmu_notifier_release(struct mm_st
if (mn->ops->release)
mn->ops->release(mn, mm);
rcu_read_unlock();
+ mmdrop(mm); /* matches do_mmu_notifier_register's inc */
spin_lock(&mm->mmu_notifier_mm->lock);
}
spin_unlock(&mm->mmu_notifier_mm->lock);
WARNING: multiple messages have this Message-ID (diff)
From: Robin Holt <holt@sgi.com>
To: linux-mm@kvack.org, Andrea Arcangeli <andrea@qumranet.com>
Cc: Nick Piggin <npiggin@suse.de>,
Christoph Lameter <cl@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: [Patch] mmu_notifiers destroyed by __mmu_notifier_release() retain extra mm_count.
Date: Thu, 5 Feb 2009 11:23:03 -0600 [thread overview]
Message-ID: <20090205172303.GB8559@sgi.com> (raw)
An application relying upon mmu_notifier_release for teardown of the
mmu_notifiers will leak mm_structs. At the do_mmu_notifier_register
increments mm_count, but __mmu_notifier_release() does not decrement it.
Signed-off-by: Robin Holt <holt@sgi.com>
CC: Stable kernel maintainers <stable@vger.kernel.org>
---
I detected this while running a 2.6.27 kernel. Could this get added to
the stable trees when accepted as well? It does cause a denial of
service with OOM.
mm/mmu_notifier.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.27/mm/mmu_notifier.c
===================================================================
--- linux-2.6.27.orig/mm/mmu_notifier.c 2008-10-09 17:13:53.000000000 -0500
+++ linux-2.6.27/mm/mmu_notifier.c 2009-02-05 10:55:07.076561592 -0600
@@ -61,6 +61,7 @@ void __mmu_notifier_release(struct mm_st
if (mn->ops->release)
mn->ops->release(mn, mm);
rcu_read_unlock();
+ mmdrop(mm); /* matches do_mmu_notifier_register's inc */
spin_lock(&mm->mmu_notifier_mm->lock);
}
spin_unlock(&mm->mmu_notifier_mm->lock);
--
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 reply other threads:[~2009-02-05 17:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 17:23 Robin Holt [this message]
2009-02-05 17:23 ` [Patch] mmu_notifiers destroyed by __mmu_notifier_release() retain extra mm_count Robin Holt
2009-02-05 19:30 ` Christoph Lameter
2009-02-05 19:30 ` Christoph Lameter
2009-02-05 20:02 ` Robin Holt
2009-02-05 20:02 ` Robin Holt
2009-02-05 23:54 ` Christoph Lameter
2009-02-05 23:54 ` Christoph Lameter
2009-02-06 1:38 ` Andrea Arcangeli
2009-02-06 1:38 ` Andrea Arcangeli
2009-02-06 1:44 ` Andrea Arcangeli
2009-02-06 1:44 ` Andrea Arcangeli
2009-02-06 12:58 ` Robin Holt
2009-02-06 12:58 ` Robin Holt
2009-02-06 16:56 ` Andrea Arcangeli
2009-02-06 16:56 ` Andrea Arcangeli
2009-02-05 21:20 ` Andrea Arcangeli
2009-02-05 21:20 ` Andrea Arcangeli
2009-02-05 22:25 ` Andrew Morton
2009-02-05 22:25 ` Andrew Morton
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=20090205172303.GB8559@sgi.com \
--to=holt@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@qumranet.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.