android_kernel_xiaomi_sm8350/arch
James Bottomley 618febd678 [PARISC] Fix the alloc_slabmgmt panic
Fix the alloc_slabmgmt panic

Hopefully this should also fix a lot of other intermittent kernel bugs.

The problem has been around since 2.6.9-rc2-pa6 when we allowed
floating point registers to be used in kernel code.  The essence of
the problem is that gcc prefers to use floating point for integer
divides and multiples.  Further, it can rely on the values in the no
clobber fp regs being correct across a function call.  Unfortunately,
our task switch function only saves the integer no clobber registers,
not the fp ones, so if gcc makes a function call to any function in
the kernel which could sleep, the values it is relying on in any no
clobber floating point register may be lost.  In the case of
alloc_slabmgmt, the value of the page offset is being stored in %fr12
across a call to kmem_getpages(), which sleeps if no pages are
available.  Thus, the offset can be trashed and the slab code can end
up with a completely bogus address leading to corruption.

Kudos to Randolph who came up with the program to trip this problem at
will and thus allowed it to be tracked and fixed.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:53:26 -04:00
..
alpha [PATCH] alpha: fix kernel alignment traps 2005-10-02 14:32:49 -07:00
arm [ARM] Fix Integrator IM/PD-1 support 2005-10-21 10:17:37 +01:00
arm26 [PATCH] Remove arch/arm26/boot/compressed/hw-bse.c 2005-09-17 11:49:59 -07:00
cris [NETFILTER]: Fix OOPSes on machines with discontiguous cpu numbering. 2005-10-13 14:41:23 -07:00
frv
h8300
i386 [PATCH] typo fix in last cpufreq powernow patch 2005-10-21 17:08:30 -07:00
ia64 [PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory 2005-10-19 23:11:33 -07:00
m32r [PATCH] m32r: Fix smp.c for preempt kernel 2005-10-14 17:10:12 -07:00
m68k
m68knommu
mips [PATCH] mips: fix build error in TANBAC TB0226 2005-10-14 17:10:11 -07:00
parisc [PARISC] Fix the alloc_slabmgmt panic 2005-10-21 22:53:26 -04:00
ppc [PATCH] ppc32: Tell userland about lack of standard TB 2005-10-12 08:24:47 -07:00
ppc64 [PATCH] ppc64: Fix typo bug in iSeries hash code 2005-10-21 12:24:41 -07:00
s390 [PATCH] s390 signal annotations 2005-09-29 08:46:27 -07:00
sh [NETFILTER]: Fix OOPSes on machines with discontiguous cpu numbering. 2005-10-13 14:41:23 -07:00
sh64
sparc [SPARC32]: Revert IOMAP change eb98129eec 2005-10-10 21:02:26 -07:00
sparc64 [SPARC64]: Fix powering off on SMP. 2005-10-14 15:26:08 -07:00
um [PATCH] build fix for uml/amd64 2005-10-19 23:18:16 -07:00
v850
x86_64 [PATCH] x86_64: Allocate cpu local data for all possible CPUs 2005-10-10 16:33:25 -07:00
xtensa [PATCH] xtensa: remove io_remap_page_range and minor clean-ups 2005-09-22 22:17:37 -07:00