From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Make sure nobody's leaking resources
Date: Mon, 20 Mar 2006 08:53:04 -0700 [thread overview]
Message-ID: <20060320155304.GI8980@parisc-linux.org> (raw)
Currently, releasing a resource also releases all of its children. That
made sense when request_resource was the main method of dividing up the
memory map. With the increased use of insert_resource, it seems to me
that we should instead reparent the newly orphaned resources. Before
we do that, let's make sure that nobody's actually relying on the current
semantics.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
diff -urpNX dontdiff linus-2.6/kernel/resource.c parisc-2.6/kernel/resource.c
--- linus-2.6/kernel/resource.c 2006-03-20 07:29:06.000000000 -0700
+++ parisc-2.6/kernel/resource.c 2006-03-20 07:00:47.000000000 -0700
@@ -181,6 +181,8 @@ static int __release_resource(struct res
{
struct resource *tmp, **p;
+ BUG_ON(old->child);
+
p = &old->parent->child;
for (;;) {
tmp = *p;
next reply other threads:[~2006-03-20 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-20 15:53 Matthew Wilcox [this message]
2006-03-20 16:10 ` [PATCH] Make sure nobody's leaking resources Muli Ben-Yehuda
2006-03-20 21:34 ` 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=20060320155304.GI8980@parisc-linux.org \
--to=matthew@wil.cx \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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