diff mbox series

[SRU,D,linux-kvm] mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n

Message ID 20190906154758.GA9640@xps-13
State New
Headers show
Series [SRU,D,linux-kvm] mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n | expand

Commit Message

Andrea Righi Sept. 6, 2019, 3:47 p.m. UTC
Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Henry Burns <henrywolfeburns@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Jonathan Adams <jwadams@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 441e254cd40dc03beec3c650ce6ce6074bc6517f)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
---
 mm/zsmalloc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Colin Ian King Sept. 6, 2019, 3:51 p.m. UTC | #1
On 06/09/2019 16:47, Andrea Righi wrote:
> Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
> Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Henry Burns <henrywolfeburns@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Shakeel Butt <shakeelb@google.com>
> Cc: Jonathan Adams <jwadams@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> (cherry picked from commit 441e254cd40dc03beec3c650ce6ce6074bc6517f)
> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
> ---
>  mm/zsmalloc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 515b00801af2..7d62ef2daf83 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2432,7 +2432,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 Andrea for the speedy turnaround.

Acked-by: Colin Ian King <colin.king@canonical.com>
Sultan Alsawaf Sept. 6, 2019, 3:52 p.m. UTC | #2
Acked-by: Sultan Alsawaf <sultan.alsawaf@canonical.com>

On Fri, Sep 6, 2019, 8:48 AM Andrea Righi <andrea.righi@canonical.com>
wrote:

> Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in
> zs_destroy_pool")
> Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Henry Burns <henrywolfeburns@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Shakeel Butt <shakeelb@google.com>
> Cc: Jonathan Adams <jwadams@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> (cherry picked from commit 441e254cd40dc03beec3c650ce6ce6074bc6517f)
> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
> ---
>  mm/zsmalloc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 515b00801af2..7d62ef2daf83 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2432,7 +2432,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;
> --
> 2.20.1
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Thadeu Lima de Souza Cascardo Sept. 6, 2019, 3:55 p.m. UTC | #3
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>

Just shove the buglink there.

BugLink: https://bugs.launchpad.net/bugs/1843069
Stefan Bader Sept. 30, 2019, 9:25 a.m. UTC | #4
On 06.09.19 17:47, Andrea Righi wrote:
> Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
> Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Henry Burns <henrywolfeburns@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Shakeel Butt <shakeelb@google.com>
> Cc: Jonathan Adams <jwadams@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> (cherry picked from commit 441e254cd40dc03beec3c650ce6ce6074bc6517f)
> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
> ---

This already was applied to disco/linux-kvm/master-next for the 2019.09.02
cycle. So just to have this documented in the mailing list.

-Stefan
>  mm/zsmalloc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 515b00801af2..7d62ef2daf83 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2432,7 +2432,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;
>
diff mbox series

Patch

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 515b00801af2..7d62ef2daf83 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2432,7 +2432,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;