On Wed, Jun 15, 2016 at 03:09:13PM +0200, Arnd Bergmann wrote:
On Wednesday, June 15, 2016 3:26:04 PM CEST Kirill A. Shutemov wrote:
On Wed, Jun 15, 2016 at 02:12:25PM +0200, Arnd Bergmann wrote:
Warnings: 1 arch/arm/include/asm/pgtable.h:262:15: warning: 'entry' may be used uninitialized in this function [-Wmaybe-uninitialized]
I have applied a local workaround to shut up the warning on my machine:
--- a/mm/memory.c +++ b/mm/memory.c @@ -3501,6 +3501,7 @@ static int handle_pte_fault(struct fault_env *fe) * for an instant, it will be difficult to retract from * concurrent faults and from rmap lookups. */
entry = *fe->pte; } else { /* See comment in pte_alloc_one_map() */ if (pmd_trans_unstable(fe->pmd) || pmd_devmap(*fe->pmd))
This is probably wrong though.
Yeah, it's NULL-pointer dereferece.
I don't see the warning. What gcc version is it?
Every version I have here shows the warning, that's 4.6, 4.7, 4.9, 5.3 and 6.1. on ARM, but I don't see it on x86 with any of the same versions.
Okay, see it. What about patch below?
I everthing is fine, I'll include this into updated version of my huge tmpfs patchset.
diff --git a/mm/memory.c b/mm/memory.c index 8e80e8ffc6ee..f50d2b3c9993 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3501,6 +3501,7 @@ static int handle_pte_fault(struct fault_env *fe) * for an instant, it will be difficult to retract from * concurrent faults and from rmap lookups. */ + entry = __pte(0); /* silly gcc */ } else { /* See comment in pte_alloc_one_map() */ if (pmd_trans_unstable(fe->pmd) || pmd_devmap(*fe->pmd))