# git rev-parse -q --verify 8604895a34d92f5e186ceb931b0d1b384030ea3d^{commit} 8604895a34d92f5e186ceb931b0d1b384030ea3d already have revision, skipping fetch # git checkout -q -f -B kisskb 8604895a34d92f5e186ceb931b0d1b384030ea3d # git clean -qxdf # < git log -1 # commit 8604895a34d92f5e186ceb931b0d1b384030ea3d # Author: Michael Bringmann # Date: Thu Sep 20 11:45:13 2018 -0500 # # powerpc/pseries: Fix unitialized timer reset on migration # # After migration of a powerpc LPAR, the kernel executes code to # update the system state to reflect new platform characteristics. # # Such changes include modifications to device tree properties provided # to the system by PHYP. Property notifications received by the # post_mobility_fixup() code are passed along to the kernel in general # through a call to of_update_property() which in turn passes such # events back to all modules through entries like the '.notifier_call' # function within the NUMA module. # # When the NUMA module updates its state, it resets its event timer. If # this occurs after a previous call to stop_topology_update() or on a # system without VPHN enabled, the code runs into an unitialized timer # structure and crashes. This patch adds a safety check along this path # toward the problem code. # # An example crash log is as follows. # # ibmvscsi 30000081: Re-enabling adapter! # ------------[ cut here ]------------ # kernel BUG at kernel/time/timer.c:958! # Oops: Exception in kernel mode, sig: 5 [#1] # LE SMP NR_CPUS=2048 NUMA pSeries # Modules linked in: nfsv3 nfs_acl nfs tcp_diag udp_diag inet_diag lockd unix_diag af_packet_diag netlink_diag grace fscache sunrpc xts vmx_crypto pseries_rng sg binfmt_misc ip_tables xfs libcrc32c sd_mod ibmvscsi ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod # CPU: 11 PID: 3067 Comm: drmgr Not tainted 4.17.0+ #179 # ... # NIP mod_timer+0x4c/0x400 # LR reset_topology_timer+0x40/0x60 # Call Trace: # 0xc0000003f9407830 (unreliable) # reset_topology_timer+0x40/0x60 # dt_update_callback+0x100/0x120 # notifier_call_chain+0x90/0x100 # __blocking_notifier_call_chain+0x60/0x90 # of_property_notify+0x90/0xd0 # of_update_property+0x104/0x150 # update_dt_property+0xdc/0x1f0 # pseries_devicetree_update+0x2d0/0x510 # post_mobility_fixup+0x7c/0xf0 # migration_store+0xa4/0xc0 # kobj_attr_store+0x30/0x60 # sysfs_kf_write+0x64/0xa0 # kernfs_fop_write+0x16c/0x240 # __vfs_write+0x40/0x200 # vfs_write+0xc8/0x240 # ksys_write+0x5c/0x100 # system_call+0x58/0x6c # # Fixes: 5d88aa85c00b ("powerpc/pseries: Update CPU maps when device tree is updated") # Cc: stable@vger.kernel.org # v3.10+ # Signed-off-by: Michael Bringmann # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 8604895a34d92f5e186ceb931b0d1b384030ea3d # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_powerpc-randconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig KCONFIG_SEED=0x485ABB2B # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig # yes \n | make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_powerpc-randconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_powerpc-randconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/platforms/cell/spufs/sched.c:1077:12: warning: 'show_spu_loadavg' defined but not used [-Wunused-function] static int show_spu_loadavg(struct seq_file *s, void *private) ^ In file included from /kisskb/src/arch/powerpc/xmon/xmon.c:67:0: /kisskb/src/arch/powerpc/xmon/dis-asm.h: In function 'print_insn_powerpc': /kisskb/src/arch/powerpc/xmon/dis-asm.h:20:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] printf("%.8x", insn); ^ /kisskb/src/arch/powerpc/xmon/dis-asm.h: In function 'print_insn_spu': /kisskb/src/arch/powerpc/xmon/dis-asm.h:26:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] printf("%.8x", insn); ^ /kisskb/src/arch/powerpc/kernel/eeh.c:1752:12: warning: 'proc_eeh_show' defined but not used [-Wunused-function] static int proc_eeh_show(struct seq_file *m, void *v) ^ /kisskb/src/scripts/unifdef.c: In function 'Mpass': /kisskb/src/scripts/unifdef.c:453:28: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/scripts/link-vmlinux.sh: line 85: 25673 Segmentation fault ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${objects} make[1]: *** [/kisskb/src/Makefile:1036: vmlinux] Error 139 make: *** [Makefile:146: sub-make] Error 2 Command 'make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_powerpc-randconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/powerpc-fixes_powerpc-randconfig_powerpc-gcc5 # Build took: 0:03:11.921139