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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2no2gjWXTcgg_g1DJ9B-j8LfyaeOn+Ji18bWS5mQNZUA@mail.gmail.com>
Date:   Wed, 6 Mar 2019 11:19:13 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     John Hubbard <jhubbard@...dia.com>
Cc:     Jérôme Glisse <jglisse@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ralph Campbell <rcampbell@...dia.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Dan Williams <dan.j.williams@...el.com>,
        Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/hmm: fix unused variable warnings

On Wed, Mar 6, 2019 at 12:51 AM John Hubbard <jhubbard@...dia.com> wrote:
>
> With some Kconfig local hacks that removed all HUGE* support, while leaving
> HMM enabled, I was able to reproduce your results, and also to verify the
> fix. It also makes sense from reading it.

Thanks for the confirmation.

> Also, I ran into one more warning as well:
>
> mm/hmm.c: In function ‘hmm_vma_walk_pud’:
> mm/hmm.c:764:25: warning: unused variable ‘vma’ [-Wunused-variable]
>   struct vm_area_struct *vma = walk->vma;
>                          ^~~
>
> ...which can be fixed like this:
>
> diff --git a/mm/hmm.c b/mm/hmm.c
> index c4beb1628cad..c1cbe82d12b5 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -761,7 +761,6 @@ static int hmm_vma_walk_pud(pud_t *pudp,
>  {
>         struct hmm_vma_walk *hmm_vma_walk = walk->private;
>         struct hmm_range *range = hmm_vma_walk->range;
> -       struct vm_area_struct *vma = walk->vma;
>         unsigned long addr = start, next;
>         pmd_t *pmdp;
>         pud_t pud;
> @@ -807,7 +806,7 @@ static int hmm_vma_walk_pud(pud_t *pudp,
>                 return 0;
>         }
>
> -       split_huge_pud(vma, pudp, addr);
> +       split_huge_pud(walk->vma, pudp, addr);
>         if (pud_none(*pudp))
>                 goto again;
>
> ...so maybe you'd like to fold that into your patch?

I also ran into this one last night during further randconfig testing,
and came up with the same patch that you showed here. I'll
send this one to Andrew and add a Reported-by line for you,
since he already merged the first patch.

I'll leave it up to Andrew to fold the fixes into one, or into the original
patches if he thinks that makes sense.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ