2011-04-12 07:19:21

by Li Zefan

[permalink] [raw]
Subject: [PATCH] slub: Fix a typo in config name

There's no config named SLAB_DEBUG, and it should be a typo
of SLUB_DEBUG.

Signed-off-by: Li Zefan <[email protected]>
---

not slub expert, don't know how this bug affects slub debugging.

---
mm/slub.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 94d2a33..df77f78 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3203,7 +3203,7 @@ static void __init kmem_cache_bootstrap_fixup(struct kmem_cache *s)
list_for_each_entry(p, &n->partial, lru)
p->slab = s;

-#ifdef CONFIG_SLAB_DEBUG
+#ifdef CONFIG_SLUB_DEBUG
list_for_each_entry(p, &n->full, lru)
p->slab = s;
#endif
--
1.7.3.1


Subject: Re: [PATCH] slub: Fix a typo in config name

On Tue, 12 Apr 2011, Li Zefan wrote:

> There's no config named SLAB_DEBUG, and it should be a typo
> of SLUB_DEBUG.
>
> Signed-off-by: Li Zefan <[email protected]>
> ---
>
> not slub expert, don't know how this bug affects slub debugging.

Affects the bootstrap code.

Acked-by: Christoph Lameter <[email protected]>

2011-04-13 02:16:29

by David Rientjes

[permalink] [raw]
Subject: Re: [PATCH] slub: Fix a typo in config name

On Tue, 12 Apr 2011, Christoph Lameter wrote:

> On Tue, 12 Apr 2011, Li Zefan wrote:
>
> > There's no config named SLAB_DEBUG, and it should be a typo
> > of SLUB_DEBUG.
> >
> > Signed-off-by: Li Zefan <[email protected]>
> > ---
> >
> > not slub expert, don't know how this bug affects slub debugging.
>
> Affects the bootstrap code.
>

I don't see how, there should be no partial or full slabs for either
kmem_cache or kmem_cache_node at this point in the boot sequence. I think
kmem_cache_bootstrap_fixup() should only need to add the cache to the list
of slab caches and set the refcount accordingly.

Subject: Re: [PATCH] slub: Fix a typo in config name

On Tue, 12 Apr 2011, David Rientjes wrote:

> On Tue, 12 Apr 2011, Christoph Lameter wrote:
>
> > On Tue, 12 Apr 2011, Li Zefan wrote:
> >
> > > There's no config named SLAB_DEBUG, and it should be a typo
> > > of SLUB_DEBUG.
> > >
> > > Signed-off-by: Li Zefan <[email protected]>
> > > ---
> > >
> > > not slub expert, don't know how this bug affects slub debugging.
> >
> > Affects the bootstrap code.
> >
>
> I don't see how, there should be no partial or full slabs for either
> kmem_cache or kmem_cache_node at this point in the boot sequence. I think
> kmem_cache_bootstrap_fixup() should only need to add the cache to the list
> of slab caches and set the refcount accordingly.

Hmmm... That depends on the number of objects in a slab page. If that is
one then we may have an issue.