Re: [PATCH] mm: thp: avoid uninitialized variable use

2017-12-16 Thread Yang Shi
On 12/16/17 4:24 AM, Arnd Bergmann wrote: On Fri, Dec 15, 2017 at 7:01 PM, Yang Shi wrote: On 12/15/17 4:51 AM, Arnd Bergmann wrote: When the down_read_trylock() fails, 'vma' has not been initialized yet, which gcc now warns about: mm/khugepaged.c: In function 'khugepaged': mm/khugepaged

Re: [PATCH] mm: thp: avoid uninitialized variable use

2017-12-16 Thread Arnd Bergmann
On Fri, Dec 15, 2017 at 7:01 PM, Yang Shi wrote: > > > On 12/15/17 4:51 AM, Arnd Bergmann wrote: >> >> When the down_read_trylock() fails, 'vma' has not been initialized >> yet, which gcc now warns about: >> >> mm/khugepaged.c: In function 'khugepaged': >> mm/khugepaged.c:1659:25: error: 'vma' may

Re: [PATCH] mm: thp: avoid uninitialized variable use

2017-12-15 Thread Yang Shi
On 12/15/17 4:51 AM, Arnd Bergmann wrote: When the down_read_trylock() fails, 'vma' has not been initialized yet, which gcc now warns about: mm/khugepaged.c: In function 'khugepaged': mm/khugepaged.c:1659:25: error: 'vma' may be used uninitialized in this function [-Werror=maybe-uninitialized

Re: [PATCH] mm: thp: avoid uninitialized variable use

2017-12-15 Thread Michal Hocko
On Fri 15-12-17 13:51:04, Arnd Bergmann wrote: > When the down_read_trylock() fails, 'vma' has not been initialized > yet, which gcc now warns about: > > mm/khugepaged.c: In function 'khugepaged': > mm/khugepaged.c:1659:25: error: 'vma' may be used uninitialized in this > function [-Werror=maybe-

[PATCH] mm: thp: avoid uninitialized variable use

2017-12-15 Thread Arnd Bergmann
When the down_read_trylock() fails, 'vma' has not been initialized yet, which gcc now warns about: mm/khugepaged.c: In function 'khugepaged': mm/khugepaged.c:1659:25: error: 'vma' may be used uninitialized in this function [-Werror=maybe-uninitialized] Presumable we are not supposed to call find