* [PATCH -mmotm] mm: fix kmemcheck.c build errors
@ 2014-09-05 7:28 Joonsoo Kim
2014-09-05 20:01 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Joonsoo Kim @ 2014-09-05 7:28 UTC (permalink / raw)
To: akpm
Cc: linux-kernel, linux-mm, linux-next, sfr, mhocko, Pekka Enberg,
Vegard Nossum, Christoph Lameter, David Rientjes, Joonsoo Kim,
Randy Dunlap
mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
in mmotm makes following build failure.
../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
../mm/slab.h: In function 'cache_from_obj':
../mm/slab.h:283:2: error: implicit declaration of function
'memcg_kmem_enabled' [-Werror=implicit-function-declaration]
Add header files to fix kmemcheck.c build errors.
[iamjoonsoo.kim@lge.com] move up memcontrol.h header
to fix build failure if CONFIG_MEMCG_KMEM=y too.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
mm/kmemcheck.c | 1 +
mm/slab.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/mm/kmemcheck.c b/mm/kmemcheck.c
index fd814fd..cab58bb 100644
--- a/mm/kmemcheck.c
+++ b/mm/kmemcheck.c
@@ -2,6 +2,7 @@
#include <linux/mm_types.h>
#include <linux/mm.h>
#include <linux/slab.h>
+#include "slab.h"
#include <linux/kmemcheck.h>
void kmemcheck_alloc_shadow(struct page *page, int order, gfp_t flags, int node)
diff --git a/mm/slab.h b/mm/slab.h
index 13845d0..963a3f8 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -37,6 +37,8 @@ struct kmem_cache {
#include <linux/slub_def.h>
#endif
+#include <linux/memcontrol.h>
+
/*
* State of the slab allocator.
*
--
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mmotm] mm: fix kmemcheck.c build errors
2014-09-05 7:28 [PATCH -mmotm] mm: fix kmemcheck.c build errors Joonsoo Kim
@ 2014-09-05 20:01 ` Andrew Morton
2014-09-15 1:49 ` Joonsoo Kim
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2014-09-05 20:01 UTC (permalink / raw)
To: Joonsoo Kim
Cc: linux-kernel, linux-mm, linux-next, sfr, mhocko, Pekka Enberg,
Vegard Nossum, Christoph Lameter, David Rientjes, Randy Dunlap
On Fri, 5 Sep 2014 16:28:06 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
> mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
> in mmotm makes following build failure.
>
> ../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
>
> ../mm/slab.h: In function 'cache_from_obj':
> ../mm/slab.h:283:2: error: implicit declaration of function
> 'memcg_kmem_enabled' [-Werror=implicit-function-declaration]
>
> Add header files to fix kmemcheck.c build errors.
>
> [iamjoonsoo.kim@lge.com] move up memcontrol.h header
> to fix build failure if CONFIG_MEMCG_KMEM=y too.
Looking at this line
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
and at this line
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
I am suspecting that this patch was authored by Randy. But there was
no From: line at start-of-changelog to communicate this?
> diff --git a/mm/slab.h b/mm/slab.h
> index 13845d0..963a3f8 100644
> --- a/mm/slab.h
> +++ b/mm/slab.h
> @@ -37,6 +37,8 @@ struct kmem_cache {
> #include <linux/slub_def.h>
> #endif
>
> +#include <linux/memcontrol.h>
> +
> /*
> * State of the slab allocator.
> *
It seems a bit wrong to include a fairly high-level memcontol.h into a
fairly low-level slab.h, but I expect it will work.
I can't really see how
mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
caused the breakage. I don't know how you were triggering this build
failure - please always include such info in the changelogs.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mmotm] mm: fix kmemcheck.c build errors
2014-09-05 20:01 ` Andrew Morton
@ 2014-09-15 1:49 ` Joonsoo Kim
0 siblings, 0 replies; 6+ messages in thread
From: Joonsoo Kim @ 2014-09-15 1:49 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linux-mm, linux-next, sfr, mhocko, Pekka Enberg,
Vegard Nossum, Christoph Lameter, David Rientjes, Randy Dunlap
On Fri, Sep 05, 2014 at 01:01:02PM -0700, Andrew Morton wrote:
> On Fri, 5 Sep 2014 16:28:06 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
>
> > mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
> > in mmotm makes following build failure.
> >
> > ../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
> > ../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
> > ../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
> > ../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
> >
> > ../mm/slab.h: In function 'cache_from_obj':
> > ../mm/slab.h:283:2: error: implicit declaration of function
> > 'memcg_kmem_enabled' [-Werror=implicit-function-declaration]
> >
> > Add header files to fix kmemcheck.c build errors.
> >
> > [iamjoonsoo.kim@lge.com] move up memcontrol.h header
> > to fix build failure if CONFIG_MEMCG_KMEM=y too.
>
> Looking at this line
>
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>
> and at this line
>
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> I am suspecting that this patch was authored by Randy. But there was
> no From: line at start-of-changelog to communicate this?
>
> > diff --git a/mm/slab.h b/mm/slab.h
> > index 13845d0..963a3f8 100644
> > --- a/mm/slab.h
> > +++ b/mm/slab.h
> > @@ -37,6 +37,8 @@ struct kmem_cache {
> > #include <linux/slub_def.h>
> > #endif
> >
> > +#include <linux/memcontrol.h>
> > +
> > /*
> > * State of the slab allocator.
> > *
>
> It seems a bit wrong to include a fairly high-level memcontol.h into a
> fairly low-level slab.h, but I expect it will work.
>
> I can't really see how
> mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
> caused the breakage. I don't know how you were triggering this build
> failure - please always include such info in the changelogs.
Hello,
Sorry for all mistakes.
Here goes new one having proper commit description and authorship.
------------>8------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mmotm] mm: fix kmemcheck.c build errors
2014-08-31 11:36 ` Andrey Ryabinin
@ 2014-08-31 14:48 ` Randy Dunlap
0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2014-08-31 14:48 UTC (permalink / raw)
To: Andrey Ryabinin, Joonsoo Kim
Cc: Andrew Morton, Christoph Lameter, LKML, linux-mm, linux-next,
sfr, mhocko, Pekka Enberg, Vegard Nossum
On 08/31/14 04:36, Andrey Ryabinin wrote:
> 2014-08-30 5:48 GMT+04:00 Randy Dunlap <rdunlap@infradead.org>:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Add header file to fix kmemcheck.c build errors:
>>
>> ../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
>> ../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
>> ../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
>> ../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> ---
>> mm/kmemcheck.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> Index: mmotm-2014-0829-1515/mm/kmemcheck.c
>> ===================================================================
>> --- mmotm-2014-0829-1515.orig/mm/kmemcheck.c
>> +++ mmotm-2014-0829-1515/mm/kmemcheck.c
>> @@ -2,6 +2,7 @@
>> #include <linux/mm_types.h>
>> #include <linux/mm.h>
>> #include <linux/slab.h>
>> +#include <linux/slab_def.h>
>
> This will work only for CONFIG_SLAB=y. struct kmem_cache definition
> was moved to internal header [*],
> so you need to include it here:
> #include "slab.h"
>
> [*] http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
Thanks. That makes sense. [testing] mm/kmemcheck.c still has a build error:
In file included from ../mm/kmemcheck.c:5:0:
../mm/slab.h: In function 'cache_from_obj':
../mm/slab.h:283:2: error: implicit declaration of function 'memcg_kmem_enabled' [-Werror=implicit-function-declaration]
Maybe Andrew should just drop that patch and its associated patches.
>> #include <linux/kmemcheck.h>
>>
>> void kmemcheck_alloc_shadow(struct page *page, int order, gfp_t flags, int node)
>>
>
>
--
~Randy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -mmotm] mm: fix kmemcheck.c build errors
2014-08-30 1:48 ` [PATCH -mmotm] mm: fix kmemcheck.c build errors Randy Dunlap
@ 2014-08-31 11:36 ` Andrey Ryabinin
2014-08-31 14:48 ` Randy Dunlap
0 siblings, 1 reply; 6+ messages in thread
From: Andrey Ryabinin @ 2014-08-31 11:36 UTC (permalink / raw)
To: Randy Dunlap, Joonsoo Kim
Cc: Andrew Morton, Christoph Lameter, LKML, linux-mm, linux-next,
sfr, mhocko, Pekka Enberg, Vegard Nossum
2014-08-30 5:48 GMT+04:00 Randy Dunlap <rdunlap@infradead.org>:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add header file to fix kmemcheck.c build errors:
>
> ../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
> ../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> mm/kmemcheck.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: mmotm-2014-0829-1515/mm/kmemcheck.c
> ===================================================================
> --- mmotm-2014-0829-1515.orig/mm/kmemcheck.c
> +++ mmotm-2014-0829-1515/mm/kmemcheck.c
> @@ -2,6 +2,7 @@
> #include <linux/mm_types.h>
> #include <linux/mm.h>
> #include <linux/slab.h>
> +#include <linux/slab_def.h>
This will work only for CONFIG_SLAB=y. struct kmem_cache definition
was moved to internal header [*],
so you need to include it here:
#include "slab.h"
[*] http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab_common-move-kmem_cache-definition-to-internal-header.patch
> #include <linux/kmemcheck.h>
>
> void kmemcheck_alloc_shadow(struct page *page, int order, gfp_t flags, int node)
>
--
Best regards,
Andrey Ryabinin
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH -mmotm] mm: fix kmemcheck.c build errors
2014-08-29 22:16 mmotm 2014-08-29-15-15 uploaded akpm
@ 2014-08-30 1:48 ` Randy Dunlap
2014-08-31 11:36 ` Andrey Ryabinin
0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2014-08-30 1:48 UTC (permalink / raw)
To: akpm, linux-kernel, linux-mm, linux-next, sfr, mhocko,
Pekka Enberg, Vegard Nossum
From: Randy Dunlap <rdunlap@infradead.org>
Add header file to fix kmemcheck.c build errors:
../mm/kmemcheck.c:70:7: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:83:15: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:95:8: error: dereferencing pointer to incomplete type
../mm/kmemcheck.c:95:21: error: dereferencing pointer to incomplete type
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
mm/kmemcheck.c | 1 +
1 file changed, 1 insertion(+)
Index: mmotm-2014-0829-1515/mm/kmemcheck.c
===================================================================
--- mmotm-2014-0829-1515.orig/mm/kmemcheck.c
+++ mmotm-2014-0829-1515/mm/kmemcheck.c
@@ -2,6 +2,7 @@
#include <linux/mm_types.h>
#include <linux/mm.h>
#include <linux/slab.h>
+#include <linux/slab_def.h>
#include <linux/kmemcheck.h>
void kmemcheck_alloc_shadow(struct page *page, int order, gfp_t flags, int node)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-15 1:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 7:28 [PATCH -mmotm] mm: fix kmemcheck.c build errors Joonsoo Kim
2014-09-05 20:01 ` Andrew Morton
2014-09-15 1:49 ` Joonsoo Kim
-- strict thread matches above, loose matches on Subject: below --
2014-08-29 22:16 mmotm 2014-08-29-15-15 uploaded akpm
2014-08-30 1:48 ` [PATCH -mmotm] mm: fix kmemcheck.c build errors Randy Dunlap
2014-08-31 11:36 ` Andrey Ryabinin
2014-08-31 14:48 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox