Re: [PATCH 1/2] maple_tree: add test to replicate low memory race conditions

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

 



* Matthew Wilcox <willy@xxxxxxxxxxxxx> [240808 15:15]:
> On Thu, Aug 08, 2024 at 12:29:59PM -0400, Sidhartha Kumar wrote:
> > diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> > index aa3a5df15b8e..65fba37ef999 100644
> > --- a/lib/maple_tree.c
> > +++ b/lib/maple_tree.c
> > @@ -6997,6 +6997,18 @@ void mt_set_non_kernel(unsigned int val)
> >  	kmem_cache_set_non_kernel(maple_node_cache, val);
> >  }
> >  
> > +extern void kmem_cache_set_callback(struct kmem_cache *cachep, void (*callback)(void *));
> > +void mt_set_callback(void (*callback)(void *))
> > +{
> > +	kmem_cache_set_callback(maple_node_cache, callback);
> > +}
> > +
> > +extern void kmem_cache_set_private(struct kmem_cache *cachep, void *private);
> > +void mt_set_private(void *private)
> > +{
> > +	kmem_cache_set_private(maple_node_cache, private);
> > +}
> > +
> >  extern unsigned long kmem_cache_get_alloc(struct kmem_cache *);
> >  unsigned long mt_get_alloc_size(void)
> >  {
> 
> This should surely not be in lib/maple_tree.c ...
> 

It has to be as it uses the kmem_cache maple_node_cache reference.

It is located in an ifndef __KERNEL__ and an ifdef
CONFIG_DEBUG_MAPLE_TREE, so it won't be in any kernel builds.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux