# git rev-parse -q --verify 0846dd77c8349ec92ca0079c9c71d130f34cb192^{commit} 0846dd77c8349ec92ca0079c9c71d130f34cb192 already have revision, skipping fetch # git checkout -q -f -B kisskb 0846dd77c8349ec92ca0079c9c71d130f34cb192 # git clean -qxdf # < git log -1 # commit 0846dd77c8349ec92ca0079c9c71d130f34cb192 # Author: Shivaprasad G Bhat # Date: Tue Feb 13 10:05:22 2024 -0600 # # powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach # # The function spapr_tce_platform_iommu_attach_dev() is missing to call # iommu_group_put() when the domain is already set. This refcount leak # shows up with BUG_ON() during DLPAR remove operation as: # # KernelBug: Kernel bug in state 'None': kernel BUG at arch/powerpc/platforms/pseries/iommu.c:100! # Oops: Exception in kernel mode, sig: 5 [#1] # LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries # # Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_016) hv:phyp pSeries # NIP: c0000000000ff4d4 LR: c0000000000ff4cc CTR: 0000000000000000 # REGS: c0000013aed5f840 TRAP: 0700 Tainted: G I (6.8.0-rc3-autotest-g99bd3cb0d12e) # MSR: 8000000000029033 CR: 44002402 XER: 20040000 # CFAR: c000000000a0d170 IRQMASK: 0 # ... # NIP iommu_reconfig_notifier+0x94/0x200 # LR iommu_reconfig_notifier+0x8c/0x200 # Call Trace: # iommu_reconfig_notifier+0x8c/0x200 (unreliable) # notifier_call_chain+0xb8/0x19c # blocking_notifier_call_chain+0x64/0x98 # of_reconfig_notify+0x44/0xdc # of_detach_node+0x78/0xb0 # ofdt_write.part.0+0x86c/0xbb8 # proc_reg_write+0xf4/0x150 # vfs_write+0xf8/0x488 # ksys_write+0x84/0x140 # system_call_exception+0x138/0x330 # system_call_vectored_common+0x15c/0x2ec # # The patch adds the missing iommu_group_put() call. # # Fixes: a8ca9fc9134c ("powerpc/iommu: Do not do platform domain attach atctions after probe") # Reported-by: Venkat Rao Bagalkote # Closes: https://lore.kernel.org/all/274e0d2b-b5cc-475e-94e6-8427e88e271d@linux.vnet.ibm.com/ # Signed-off-by: Shivaprasad G Bhat # Tested-by: Venkat Rao Bagalkote # Reviewed-by: Jason Gunthorpe # Signed-off-by: Michael Ellerman # Link: https://msgid.link/170784021983.6249.10039296655906636112.stgit@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 0846dd77c8349ec92ca0079c9c71d130f34cb192 # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_warp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- 44x/warp_defconfig # < make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_warp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_warp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_warp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/platforms/44x/warp.c:109:15: error: variable 'warp_gpio_leds' has initializer but incomplete type static struct platform_device warp_gpio_leds = { ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:110:2: error: unknown field 'name' specified in initializer .name = "leds-gpio", ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:110:10: error: excess elements in struct initializer [-Werror] .name = "leds-gpio", ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:110:10: note: (near initialization for 'warp_gpio_leds') /kisskb/src/arch/powerpc/platforms/44x/warp.c:111:2: error: unknown field 'id' specified in initializer .id = -1, ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:111:8: error: excess elements in struct initializer [-Werror] .id = -1, ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:111:8: note: (near initialization for 'warp_gpio_leds') /kisskb/src/arch/powerpc/platforms/44x/warp.c:112:2: error: unknown field 'dev' specified in initializer .dev = { ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:112:9: error: extra brace group at end of initializer .dev = { ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c:112:9: note: (near initialization for 'warp_gpio_leds') /kisskb/src/arch/powerpc/platforms/44x/warp.c:112:9: error: excess elements in struct initializer [-Werror] /kisskb/src/arch/powerpc/platforms/44x/warp.c:112:9: note: (near initialization for 'warp_gpio_leds') /kisskb/src/arch/powerpc/platforms/44x/warp.c: In function 'pika_setup_leds': /kisskb/src/arch/powerpc/platforms/44x/warp.c:197:11: error: implicit declaration of function 'platform_device_register' [-Werror=implicit-function-declaration] error = platform_device_register(&warp_gpio_leds); ^ /kisskb/src/arch/powerpc/platforms/44x/warp.c: At top level: cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: all warnings being treated as errors make[6]: *** [/kisskb/src/scripts/Makefile.build:243: arch/powerpc/platforms/44x/warp.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:481: arch/powerpc/platforms/44x] Error 2 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:481: arch/powerpc/platforms] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:481: arch/powerpc] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/kisskb/src/Makefile:1921: .] Error 2 make[1]: *** [/kisskb/src/Makefile:240: __sub-make] Error 2 make: *** [Makefile:240: __sub-make] Error 2 Command 'make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_warp_defconfig_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_44x_warp_defconfig_powerpc-gcc5 # Build took: 0:00:47.641463