Rick Lindsley
f39356261c
powerpc/book3s/64: check for NULL pointer in pgd_alloc()
...
When the memset code was added to pgd_alloc(), it failed to consider
that kmem_cache_alloc() can return NULL. It's uncommon, but not
impossible under heavy memory contention. Example oops:
Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc0000000000a4000
Oops: Kernel access of bad area, sig: 11 [#1 ]
LE SMP NR_CPUS=2048 NUMA pSeries
CPU: 70 PID: 48471 Comm: entrypoint.sh Kdump: loaded Not tainted 4.14.0-115.6.1.el7a.ppc64le #1
task: c000000334a00000 task.stack: c000000331c00000
NIP: c0000000000a4000 LR: c00000000012f43c CTR: 0000000000000020
REGS: c000000331c039c0 TRAP: 0300 Not tainted (4.14.0-115.6.1.el7a.ppc64le)
MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]> CR: 44022840 XER: 20040000
CFAR: c000000000008874 DAR: 0000000000000000 DSISR: 42000000 SOFTE: 1
...
NIP [c0000000000a4000] memset+0x68/0x104
LR [c00000000012f43c] mm_init+0x27c/0x2f0
Call Trace:
mm_init+0x260/0x2f0 (unreliable)
copy_mm+0x11c/0x638
copy_process.isra.28.part.29+0x6fc/0x1080
_do_fork+0xdc/0x4c0
ppc_clone+0x8/0xc
Instruction dump:
409e000c b0860000 38c60002 409d000c 90860000 38c60004 78a0d183 78a506a0
7c0903a6 41820034 60000000 60420000 <f8860000> f8860008 f8860010 f8860018
Fixes: fc5c2f4a55a2 ("powerpc/mm/hash64: Zero PGD pages on allocation")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Rick Lindsley <ricklind@vnet.linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-05-07 13:24:31 +10:00
..
2019-05-03 02:54:57 +10:00
2019-05-03 02:54:58 +10:00
2019-04-20 22:03:11 +10:00
2019-05-07 13:24:31 +10:00
2019-05-03 02:54:57 +10:00
2019-04-30 22:52:03 +10:00
2019-05-03 01:20:26 +10:00
2019-01-14 20:39:27 +11:00
2019-05-06 22:37:39 +10:00
2019-03-16 12:20:08 -07:00
2019-01-03 18:57:57 -08:00
2019-05-03 02:55:00 +10:00
2019-05-03 02:55:00 +10:00
2019-05-03 01:20:26 +10:00
2019-04-11 15:31:41 +10:00
2018-12-04 19:45:01 +11:00
2019-05-03 02:54:57 +10:00
2018-10-19 00:56:17 +11:00
2019-05-03 01:20:26 +10:00
2019-05-03 02:54:57 +10:00
2019-04-20 22:02:12 +10:00