Re: 2.6.13-rc4-mm1

From: Andrew Morton
Date: Sun Jul 31 2005 - 12:49:34 EST

Andreas Steinmetz <ast@xxxxxxxx> wrote:
> Andrew Morton wrote:
> >
> Andrew,
> the good news is I can access pcmcia devices with rc4-mm1 which I
> couldn't with at least rc3-mm1 on my x86_64 laptop. There is at least
> one more problem with yenta_socket. Please see the attached dmesg output
> and look for:
> Badness in __release_resource at kernel/resource.c:184
> This happens when accessing pcmcia from an initrd to read keys from a
> pcmcia flash disk and removing the pcmcia modules afterwards.

hm, OK. That's brought to us by the below -mm-only debugging patch. Maybe
we should add more stuff to it to idenfify the child resources?

From: willy@xxxxxxxxxxxxxxxx (Matthew Wilcox)

What does it mean to release a resource with children? Should the children
become children of the released resource's parent? Should they be released
too? Should we fail the release?

I bet we have no callers who expect this right now, but with
insert_resource() we may get some. At the point where someone hits this
BUG we can figure out what semantics we want.

Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>

25-akpm/kernel/resource.c | 2 ++
1 files changed, 2 insertions(+)

diff -puN kernel/resource.c~releasing-resources-with-children kernel/resource.c
--- 25/kernel/resource.c~releasing-resources-with-children 2005-04-02 00:21:52.000000000 -0800
+++ 25-akpm/kernel/resource.c 2005-04-02 00:22:22.000000000 -0800
@@ -181,6 +181,8 @@ static int __release_resource(struct res
struct resource *tmp, **p;

+ WARN_ON(old->child);
p = &old->parent->child;
for (;;) {
tmp = *p;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at