All of lore.kernel.org
 help / color / mirror / Atom feed
* Kernel 5.2.11 dpes not compile
@ 2019-08-29 12:13 François Valenduc
  2019-08-29 12:28 ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: François Valenduc @ 2019-08-29 12:13 UTC (permalink / raw)
  To: stable

The following patch causes a build failure:


Author: Henry Burns <henryburns@google.com>
Date:   Sat Aug 24 17:55:06 2019 -0700

    mm/zsmalloc.c: fix race condition in zs_destroy_pool

I get this error:

 CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  CC      mm/zsmalloc.o
In file included from ./include/linux/mmzone.h:10:0,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/umh.h:4,
                 from ./include/linux/kmod.h:9,
                 from ./include/linux/module.h:13,
                 from mm/zsmalloc.c:33:
mm/zsmalloc.c: In function ‘zs_create_pool’:
mm/zsmalloc.c:2435:27: error: ‘struct zs_pool’ has no member named
‘migration_wait’
  init_waitqueue_head(&pool->migration_wait);
                           ^
./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
   __init_waitqueue_head((wq_head), #wq_head, &__key);  \
                          ^~~~~~~
scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
make[1]: *** [mm/zsmalloc.o] Error 1
Makefile:1073: recipe for target 'mm' failed

You can find my configuration file attached.

Does anybody have any idea about this ?
Thanks in advance,

François Valenduc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel 5.2.11 dpes not compile
  2019-08-29 12:13 Kernel 5.2.11 dpes not compile François Valenduc
@ 2019-08-29 12:28 ` Jiri Slaby
  2019-08-29 12:31   ` François Valenduc
  2019-08-29 12:32   ` Sergey Senozhatsky
  0 siblings, 2 replies; 6+ messages in thread
From: Jiri Slaby @ 2019-08-29 12:28 UTC (permalink / raw)
  To: François Valenduc, stable, henryburns, sergey.senozhatsky,
	Andrew Morton

On 29. 08. 19, 14:13, François Valenduc wrote:
> The following patch causes a build failure:
> 
> 
> Author: Henry Burns <henryburns@google.com>
> Date:   Sat Aug 24 17:55:06 2019 -0700
> 
>     mm/zsmalloc.c: fix race condition in zs_destroy_pool

So this is f6d997de0883 in 5.2.11 and 701d678599d0 in upstream.

> I get this error:
> 
>  CALL    scripts/checksyscalls.sh
>   CALL    scripts/atomic/check-atomics.sh
>   DESCEND  objtool
>   CHK     include/generated/compile.h
>   CC      mm/zsmalloc.o
> In file included from ./include/linux/mmzone.h:10:0,
>                  from ./include/linux/gfp.h:6,
>                  from ./include/linux/umh.h:4,
>                  from ./include/linux/kmod.h:9,
>                  from ./include/linux/module.h:13,
>                  from mm/zsmalloc.c:33:
> mm/zsmalloc.c: In function ‘zs_create_pool’:
> mm/zsmalloc.c:2435:27: error: ‘struct zs_pool’ has no member named
> ‘migration_wait’
>   init_waitqueue_head(&pool->migration_wait);

Obviously, as this is not protected by
#ifdef CONFIG_COMPACTION
...
#endif
as is its definition in the structure (and its other uses).

> ./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
>    __init_waitqueue_head((wq_head), #wq_head, &__key);  \
>                           ^~~~~~~
> scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
> make[1]: *** [mm/zsmalloc.o] Error 1
> Makefile:1073: recipe for target 'mm' failed
> 
> You can find my configuration file attached.

You forgot to attach it, but you have CONFIG_COMPACTION=n, I assume.

> Does anybody have any idea about this ?

Sure, this will fix it (or turn on compaction):
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2413,7 +2413,9 @@ struct zs_pool *zs_create_pool(const char *name)
        if (!pool->name)
                goto err;

+#ifdef CONFIG_COMPACTION
        init_waitqueue_head(&pool->migration_wait);
+#endif

        if (create_cache(pool))
                goto err;

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel 5.2.11 dpes not compile
  2019-08-29 12:28 ` Jiri Slaby
@ 2019-08-29 12:31   ` François Valenduc
  2019-08-29 12:32   ` Sergey Senozhatsky
  1 sibling, 0 replies; 6+ messages in thread
From: François Valenduc @ 2019-08-29 12:31 UTC (permalink / raw)
  To: Jiri Slaby, stable

Sorry, I forgot to attach the config file.
Indeed, I have CONFIG_COMPACTION=n

François Valenduc

Le jeu. 29 août 2019 à 14:28, Jiri Slaby <jslaby@suse.cz> a écrit :
>
> On 29. 08. 19, 14:13, François Valenduc wrote:
> > The following patch causes a build failure:
> >
> >
> > Author: Henry Burns <henryburns@google.com>
> > Date:   Sat Aug 24 17:55:06 2019 -0700
> >
> >     mm/zsmalloc.c: fix race condition in zs_destroy_pool
>
> So this is f6d997de0883 in 5.2.11 and 701d678599d0 in upstream.
>
> > I get this error:
> >
> >  CALL    scripts/checksyscalls.sh
> >   CALL    scripts/atomic/check-atomics.sh
> >   DESCEND  objtool
> >   CHK     include/generated/compile.h
> >   CC      mm/zsmalloc.o
> > In file included from ./include/linux/mmzone.h:10:0,
> >                  from ./include/linux/gfp.h:6,
> >                  from ./include/linux/umh.h:4,
> >                  from ./include/linux/kmod.h:9,
> >                  from ./include/linux/module.h:13,
> >                  from mm/zsmalloc.c:33:
> > mm/zsmalloc.c: In function ‘zs_create_pool’:
> > mm/zsmalloc.c:2435:27: error: ‘struct zs_pool’ has no member named
> > ‘migration_wait’
> >   init_waitqueue_head(&pool->migration_wait);
>
> Obviously, as this is not protected by
> #ifdef CONFIG_COMPACTION
> ...
> #endif
> as is its definition in the structure (and its other uses).
>
> > ./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
> >    __init_waitqueue_head((wq_head), #wq_head, &__key);  \
> >                           ^~~~~~~
> > scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
> > make[1]: *** [mm/zsmalloc.o] Error 1
> > Makefile:1073: recipe for target 'mm' failed
> >
> > You can find my configuration file attached.
>
> You forgot to attach it, but you have CONFIG_COMPACTION=n, I assume.
>
> > Does anybody have any idea about this ?
>
> Sure, this will fix it (or turn on compaction):
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2413,7 +2413,9 @@ struct zs_pool *zs_create_pool(const char *name)
>         if (!pool->name)
>                 goto err;
>
> +#ifdef CONFIG_COMPACTION
>         init_waitqueue_head(&pool->migration_wait);
> +#endif
>
>         if (create_cache(pool))
>                 goto err;
>
> thanks,
> --
> js
> suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel 5.2.11 dpes not compile
  2019-08-29 12:28 ` Jiri Slaby
  2019-08-29 12:31   ` François Valenduc
@ 2019-08-29 12:32   ` Sergey Senozhatsky
  2019-09-02 18:01     ` François Valenduc
  1 sibling, 1 reply; 6+ messages in thread
From: Sergey Senozhatsky @ 2019-08-29 12:32 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: François Valenduc, stable, henryburns, sergey.senozhatsky,
	Andrew Morton

On (08/29/19 14:28), Jiri Slaby wrote:
[..]
> as is its definition in the structure (and its other uses).
> 
> > ./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
> >    __init_waitqueue_head((wq_head), #wq_head, &__key);  \
> >                           ^~~~~~~
> > scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
> > make[1]: *** [mm/zsmalloc.o] Error 1
> > Makefile:1073: recipe for target 'mm' failed
> > 
> > You can find my configuration file attached.
> 
> You forgot to attach it, but you have CONFIG_COMPACTION=n, I assume.
> 
> > Does anybody have any idea about this ?
> 
> Sure, this will fix it (or turn on compaction):
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2413,7 +2413,9 @@ struct zs_pool *zs_create_pool(const char *name)
>         if (!pool->name)
>                 goto err;
> 
> +#ifdef CONFIG_COMPACTION
>         init_waitqueue_head(&pool->migration_wait);
> +#endif

The fix is correct. I believe Andrew already has the same patch
in his tree.

	-ss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel 5.2.11 dpes not compile
  2019-08-29 12:32   ` Sergey Senozhatsky
@ 2019-09-02 18:01     ` François Valenduc
  2019-09-02 18:07       ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: François Valenduc @ 2019-09-02 18:01 UTC (permalink / raw)
  To: Sergey Senozhatsky, Jiri Slaby
  Cc: stable, henryburns, sergey.senozhatsky, Andrew Morton


Le 29/08/19 à 14:32, Sergey Senozhatsky a écrit :
> On (08/29/19 14:28), Jiri Slaby wrote:
> [..]
>> as is its definition in the structure (and its other uses).
>>
>>> ./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
>>>    __init_waitqueue_head((wq_head), #wq_head, &__key);  \
>>>                           ^~~~~~~
>>> scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
>>> make[1]: *** [mm/zsmalloc.o] Error 1
>>> Makefile:1073: recipe for target 'mm' failed
>>>
>>> You can find my configuration file attached.
>> You forgot to attach it, but you have CONFIG_COMPACTION=n, I assume.
>>
>>> Does anybody have any idea about this ?
>> Sure, this will fix it (or turn on compaction):
>> --- a/mm/zsmalloc.c
>> +++ b/mm/zsmalloc.c
>> @@ -2413,7 +2413,9 @@ struct zs_pool *zs_create_pool(const char *name)
>>         if (!pool->name)
>>                 goto err;
>>
>> +#ifdef CONFIG_COMPACTION
>>         init_waitqueue_head(&pool->migration_wait);
>> +#endif
> The fix is correct. I believe Andrew already has the same patch
> in his tree.
>
> 	-ss

No reaction of the stable team on this ? Meanwhile, the fix is in the
mainline tree (commit 441e254cd40dc03beec3c650ce6ce6074bc6517f).
Hopefully it can be included in the next stable releases. However, if I
read the config text, memory compaction should always be enabled, even
if it is disabled by default.

Thanks in advance,

François Valenduc



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Kernel 5.2.11 dpes not compile
  2019-09-02 18:01     ` François Valenduc
@ 2019-09-02 18:07       ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2019-09-02 18:07 UTC (permalink / raw)
  To: François Valenduc
  Cc: Sergey Senozhatsky, Jiri Slaby, stable, henryburns,
	sergey.senozhatsky, Andrew Morton

On Mon, Sep 02, 2019 at 08:01:45PM +0200, François Valenduc wrote:
> 
> Le 29/08/19 à 14:32, Sergey Senozhatsky a écrit :
> > On (08/29/19 14:28), Jiri Slaby wrote:
> > [..]
> >> as is its definition in the structure (and its other uses).
> >>
> >>> ./include/linux/wait.h:67:26: note: in definition of macro ‘init_waitqueue_head’
> >>>    __init_waitqueue_head((wq_head), #wq_head, &__key);  \
> >>>                           ^~~~~~~
> >>> scripts/Makefile.build:278: recipe for target 'mm/zsmalloc.o' failed
> >>> make[1]: *** [mm/zsmalloc.o] Error 1
> >>> Makefile:1073: recipe for target 'mm' failed
> >>>
> >>> You can find my configuration file attached.
> >> You forgot to attach it, but you have CONFIG_COMPACTION=n, I assume.
> >>
> >>> Does anybody have any idea about this ?
> >> Sure, this will fix it (or turn on compaction):
> >> --- a/mm/zsmalloc.c
> >> +++ b/mm/zsmalloc.c
> >> @@ -2413,7 +2413,9 @@ struct zs_pool *zs_create_pool(const char *name)
> >>         if (!pool->name)
> >>                 goto err;
> >>
> >> +#ifdef CONFIG_COMPACTION
> >>         init_waitqueue_head(&pool->migration_wait);
> >> +#endif
> > The fix is correct. I believe Andrew already has the same patch
> > in his tree.
> >
> > 	-ss
> 
> No reaction of the stable team on this ? Meanwhile, the fix is in the
> mainline tree (commit 441e254cd40dc03beec3c650ce6ce6074bc6517f).

Give us a chance to catch up!  :)

> Hopefully it can be included in the next stable releases. However, if I
> read the config text, memory compaction should always be enabled, even
> if it is disabled by default.

It's now queued up everywhere, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-02 18:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 12:13 Kernel 5.2.11 dpes not compile François Valenduc
2019-08-29 12:28 ` Jiri Slaby
2019-08-29 12:31   ` François Valenduc
2019-08-29 12:32   ` Sergey Senozhatsky
2019-09-02 18:01     ` François Valenduc
2019-09-02 18:07       ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.