Re: Kernel 5.2.11 dpes not compile

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

 



On 29. 08. 19, 14:13, François Valenduc wrote:
> The following patch causes a build failure:
> 
> 
> Author: Henry Burns <henryburns@xxxxxxxxxx>
> 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux