]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
parisc: Zero-initialize newly alloced memblock
authorHelge Deller <deller@gmx.de>
Tue, 11 Oct 2016 18:40:02 +0000 (20:40 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 11 Oct 2016 18:52:12 +0000 (20:52 +0200)
Commit 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
switched to the memblock allocator, but missed to zero-initialize the
newly allocated memblocks. This lead to crashes on some machines like
the rp3410.

Fixes: 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/mm/init.c

index 356f38473b5d293c20b0049a0782106ee8c8c844..e02ada312be8239d687f491b7b75824a82b1204e 100644 (file)
@@ -105,6 +105,8 @@ static void * __init get_memblock(unsigned long size)
        else
                panic("get_memblock() failed.\n");
 
+       memset(__va(phys), 0, size);
+
        return __va(phys);
 }