lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220209135333.7975a407@canb.auug.org.au>
Date:   Wed, 9 Feb 2022 13:53:33 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Cai Huoqing <cai.huoqing@...ux.dev>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Peter Xu <peterx@...hat.com>, Yang Shi <shy828301@...il.com>,
        David Hildenbrand <david@...hat.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Colin Cross <ccross@...gle.com>,
        Alistair Popple <apopple@...dia.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs/proc: task_mmu.c: Fix the error-unused variable
 'migration'

Hi Cai,

On Wed,  9 Feb 2022 10:35:59 +0800 Cai Huoqing <cai.huoqing@...ux.dev> wrote:
>
> Avoid the error-unused variable 'migration' when
> CONFIG_TRANSPARENT_HUGEPAGE and CONFIG_ARCH_ENABLE_THP_MIGRATION
> are not enabled.
> 
> Signed-off-by: Cai Huoqing <cai.huoqing@...ux.dev>
> ---
>  fs/proc/task_mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index bc2f46033231..b055ff29204d 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1441,7 +1441,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
>  	spinlock_t *ptl;
>  	pte_t *pte, *orig_pte;
>  	int err = 0;
> -	bool migration = false;
> +	bool migration __maybe_unused = false;
>  
>  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
>  	ptl = pmd_trans_huge_lock(pmdp, vma);
> -- 
> 2.25.1
> 

This has already been fixed in Andrew's patch set by moving the "#ifdef
CONFIG_TRANSPARENT_HUGEPAGE" above the "migration" declaration.

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ