# git rev-parse -q --verify 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa^{commit} 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa already have revision, skipping fetch # git checkout -q -f -B kisskb 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa # git clean -qxdf # < git log -1 # commit 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa # Author: Radu Rendec # Date: Tue Nov 27 22:20:48 2018 -0500 # # powerpc/msi: Fix NULL pointer access in teardown code # # The arch_teardown_msi_irqs() function assumes that controller ops # pointers were already checked in arch_setup_msi_irqs(), but this # assumption is wrong: arch_teardown_msi_irqs() can be called even when # arch_setup_msi_irqs() returns an error (-ENOSYS). # # This can happen in the following scenario: # - msi_capability_init() calls pci_msi_setup_msi_irqs() # - pci_msi_setup_msi_irqs() returns -ENOSYS # - msi_capability_init() notices the error and calls free_msi_irqs() # - free_msi_irqs() calls pci_msi_teardown_msi_irqs() # # This is easier to see when CONFIG_PCI_MSI_IRQ_DOMAIN is not set and # pci_msi_setup_msi_irqs() and pci_msi_teardown_msi_irqs() are just # aliases to arch_setup_msi_irqs() and arch_teardown_msi_irqs(). # # The call to free_msi_irqs() upon pci_msi_setup_msi_irqs() failure # seems legit, as it does additional cleanup; e.g. # list_del(&entry->list) and kfree(entry) inside free_msi_irqs() do # happen (MSI descriptors are allocated before pci_msi_setup_msi_irqs() # is called and need to be cleaned up if that fails). # # Fixes: 6b2fd7efeb88 ("PCI/MSI/PPC: Remove arch_msi_check_device()") # Cc: stable@vger.kernel.org # v3.18+ # Signed-off-by: Radu Rendec # 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 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:10:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ arch/powerpc/boot/dts/fsl/mpc8541cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) arch/powerpc/boot/dts/fsl/mpc8555cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc23c30) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc1343c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996329 Bytes = 5855.79 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5998158 Bytes = 5857.58 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5997003 Bytes = 5856.45 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5998230 Bytes = 5857.65 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996413 Bytes = 5855.87 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996471 Bytes = 5855.93 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5965276 Bytes = 5825.46 KiB = 5.69 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5995827 Bytes = 5855.30 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5997934 Bytes = 5857.36 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996701 Bytes = 5856.15 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996718 Bytes = 5856.17 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996328 Bytes = 5855.79 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996473 Bytes = 5855.93 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5996535 Bytes = 5855.99 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5995989 Bytes = 5855.46 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-4.20.0-rc1-g78e7b15e17ac Created: Fri Nov 30 01:10:01 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5995966 Bytes = 5855.44 KiB = 5.72 MiB Load Address: 00d00000 Entry Point: 00d002a4 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc5 # Build took: 0:01:12.154779