Subject: [linux-next][DLPAR CPU][Oops] Bad kernel stack pointer

From: Abdul Haleem <[email-masked]>
Date: Mon, 18 Sep 2017 15:38:39 +0530

Hi,

Dynamic CPU remove operation resulted in Kernel Panic on today's
next-20170915 kernel.

Machine Type: Power 7 PowerVM LPAR
Kernel : 4.13.0-next-20170915
config : attached
test: DLPAR CPU remove

dmesg logs:
----------
cpu 37 (hwid 37) Ready to die...
cpu 38 (hwid 38) Ready to die...
cpu 39 (hwid 39)
******* RTAS CReady to die...
ALL BUFFER CORRUPTION *******
[  673.435910] Bad kernel stack pointer eec51c8 365: rtas32_callat
480010897c601_buff_ptr=
b78
    0000 001E 0000 0001 0000 0002 0000 0027 [...............']
[  673.435938] Oops: Bad kernel stack pointer, sig: 6 [#1]
    0000 0000 0000 0000 0000 0005 0000 0001 [................]
[  673.435942] BE SMP NR_CPUS=20    C000 0000 0048 NUMA pSeries
01 AF3C 0000 000
0 0001 1248 [.......<.......H]
    C000 0000 0032 25D0 0000 0000 0000 0000 [.....2%.........]
    0001 0000 0000 0000 0000 0004 0000 0100 [................]
    C000 0000 0150 0AA0 C000 0013 FFFF A210 [.....P..........]
    0000 0800 .... .... .... .... .... .... [.....P..........]
[  673.435976] Dumping ftrace buffer:
366: rtas64_map_buff_ptr=
    0000 0000 0000 0000 0000 0000 0000 0000 [................]
    0000 0000 0000 0000 FFFF FFFF FFFF D8F1 [................]
    0000 0000 0000 0000 0000 0000 0000 0000 [................]
    0000 0000 0000 0000 0000 0000 0000 0000 [................]
    0000 0000 0000 0000 0000 0000 0000 0000 [................]
    0000 0000 0000 0000 0000 0000 0000 0000 [................]
    0000 0000 .... .... .... .... .... .... [................]
   (ftrace buffer empty)
Kernel panic - not syncing: Alas, I survived.

Modules linked in: xt_CHECKSUM(E) iptable_mangle(E) ipt_MASQUERADE(E)
nf_nat_masquerade_ipv4(E) iptable_nat(E) nf_nat_ipv4(E) nf_nat(E)
nf_conntrack_ipv4(E) nf_defrag_ipv4(E) xt_conntrack(E) nf_conntrack(E)
ipt_REJECT(E) nf_reject_ipv4(E) tun(E) bridge(E) stp(E) llc(E) kvm_pr(E)
kvm(E) rpadlpar_io(E) rpaphp(E) ebtable_filter(E) ebtables(E)
ip6table_filter(E) ip6_tables(E) dccp_diag(E) dccp(E) tcp_diag(E)
udp_diag(E) inet_diag(E) unix_diag(E) af_packet_diag(E) netlink_diag(E)
iptable_filter(E) sg(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E)
sunrpc(E) grace(E) binfmt_misc(E) ip_tables(E) ext4(E) mbcache(E)
jbd2(E) sd_mod(E) ibmvscsi(E) ibmveth(E) scsi_transport_srp(E)
Dumping ftrace buffer:
   (ftrace buffer empty)
CPU: 0 PID: 8633 Comm: drmgr Tainted: G            E
4.13.0-next-20170915-autotest #1
task: c0000000fd49c200 task.stack: c0000000fb824000
NIP:  480010897c601b78 LR: 480010897c601b78 CTR: 0000000000000000
REGS: c00000000ee6fd40 TRAP: 0400   Tainted: G            E
(4.13.0-next-20170915-autotest)
MSR:  8000000042801000 <SF,VEC,VSX,ME>  CR: 22000000  XER: 00000020
CFAR: 000000000ee97a20 SOFTE: -1152921504565094016
GPR00: 480010897c601b78 000000000eec51c8 000000000eea3680
000000000fc7b5c0
GPR04: 0000000000000000 00000000000000e0 000000000000b9fc
000000000000001e
GPR08: 000000000fa3b000 000000000fc7b5c0 000000000fa378f0
0000000000000000
GPR12: 0000000001500a90 c00000000e930000 0000000000000000
0000000000000000
GPR16: 0000000000000000 0000000000000000 c000000000c8c7a0
0000000010000024
GPR20: c000000000e44f74 c0000013ffff0670 0000000000000000
c000000000e44f74
GPR24: c000000000e44f70 c0000000fb8276d0 000000000000001e
0000000000000002
GPR28: 0000000000000001 0000000000000001 0000000000000002
900b00004bfe8545
NIP [480010897c601b78] 0x480010897c601b78
LR [480010897c601b78] 0x480010897c601b78
Call Trace:
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace d504e921bec4201a ]---
-- 

Regard's

Abdul Haleem
IBM Linux Technology Centre