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  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]
Date:   Wed, 6 Mar 2019 10:34:15 -0800
From:   John Hubbard <jhubbard@...dia.com>
To:     Arnd Bergmann <arnd@...db.de>
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 3/6/19 2:19 AM, Arnd Bergmann wrote:
> 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
> 

Sounds good!

thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists