OSDN Git Service

m68knommu: fix early setup to not access variables
authorGreg Ungerer <gerg@linux-m68k.org>
Tue, 23 Aug 2016 06:29:43 +0000 (16:29 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 26 Sep 2016 02:02:57 +0000 (12:02 +1000)
commitbc065e4784beefdead3e62c31fa5ff7fbb1d7f9e
treec2631da8353074c2e9a295fe1523ca83cb8e2822
parent08895a8b6b06ed2323cd97a36ee40a116b3db8ed
m68knommu: fix early setup to not access variables

The early setup code for the ColdFire 53xx platform accesses variables
before the RAM and other system initialization steps may have taken place.
Currently it has 2 global variables that will end up in the bss section
that are accessed during this early setup. There is a special static RAM
stack setup at this time, but not necessarily the RAM where kernel data
sections will end up.

Even on system setups where RAM is setup by a boot loader the access
to the early setup variables is before the BSS section has been initialized.
This can potentially corrupt a ram loaded root filesystem that sits in that
memory area before it has been moved.

These 2 variables are not used at all after being set, and can just be
removed.

Reported-by: Christian Gieseler <christiangieseler@yahoo.de>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/coldfire/m53xx.c