Re: [PATCH] Make sure nobody's leaking resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Muli Ben-Yehuda <[email protected]> wrote:
>
> On Mon, Mar 20, 2006 at 08:53:04AM -0700, Matthew Wilcox wrote:
> > 
> > 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 <[email protected]>
> > 
> > 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);
> > +
> 
> Is this expressely forbidden at this stage, or just "not recommended"?
> if the latter, WARN_ON() might be more appropriate.
> 

Yes, there's no way we can make changes like this to either -mm or to
mainline.  Making people's perfectly-working kernels go splat helps neither
them nor us.

A WARN_ON() which shuts itself up after one or three invokations would be
appropriate here.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux