android_kernel_motorola_sm6375/arch/arm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor 89931d4762 ARM: davinci: da850-evm: Avoid NULL pointer dereference
commit 83a1cde5c74bfb44b49cb2a940d044bb2380f4ea upstream.

With newer versions of GCC, there is a panic in da850_evm_config_emac()
when booting multi_v5_defconfig in QEMU under the palmetto-bmc machine:

Unable to handle kernel NULL pointer dereference at virtual address 00000020
pgd = (ptrval)
[00000020] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.0 #1
Hardware name: Generic DT based system
PC is at da850_evm_config_emac+0x1c/0x120
LR is at do_one_initcall+0x50/0x1e0

The emac_pdata pointer in soc_info is NULL because davinci_soc_info only
gets populated on davinci machines but da850_evm_config_emac() is called
on all machines via device_initcall().

Move the rmii_en assignment below the machine check so that it is only
dereferenced when running on a supported SoC.

Fixes: bae105879f ("davinci: DA850/OMAP-L138 EVM: implement autodetect of RMII PHY")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/YcS4xVWs6bQlQSPC@archlinux-ax161/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:19:39 +02:00
..
boot ARM: dts: spear13xx: Update SPI dma properties 2022-04-15 14:18:30 +02:00
common
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
crypto crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata 2020-12-30 11:51:36 +01:00
include KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated 2022-03-19 13:40:15 +01:00
kernel ARM: fix Thumb2 regression with Spectre BHB 2022-03-16 13:21:48 +01:00
kvm KVM: arm64: Ensure I-cache isolation between vcpus of a same VM 2021-03-17 17:03:57 +01:00
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: of_node_put() after its usage 2020-10-29 09:57:58 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: davinci: da850-evm: Avoid NULL pointer dereference 2022-04-20 09:19:39 +02:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: exynos: add missing of_node_put for loop iteration 2021-07-20 16:10:51 +02:00
mach-footbridge ARM: footbridge: fix PCI interrupt mapping 2021-04-21 12:56:17 +02:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence 2021-10-13 10:08:19 +02:00
mach-integrator ARM: integrator: Add some Kconfig selections 2020-06-24 17:50:10 +02:00
mach-iop32x ARM: iop32x: offset IRQ numbers by 1 2022-04-15 14:18:29 +02:00
mach-ixp4xx clocksource/drivers/ixp4xx: Select TIMER_OF when needed 2021-03-04 10:26:29 +01:00
mach-keystone ARM: keystone: fix integer overflow warning 2021-04-21 12:56:13 +02:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp ARM: mmp: Fix failure to remove sram device 2022-04-15 14:18:25 +02:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 ARM: OMAP: replace setup_irq() by request_irq() 2021-06-23 14:41:31 +02:00
mach-omap2 ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of 2022-02-23 12:00:00 +01:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: 9187/1: JIVE: fix return value of __setup handler 2022-04-15 14:18:31 +02:00
mach-s3c64xx
mach-s5pv210
mach-sa1100
mach-shmobile ARM: shmobile: rcar-gen2: Add missing of_node_put() 2022-01-27 09:19:40 +01:00
mach-socfpga ARM: socfpga: fix missing RESET_CONTROLLER 2022-02-16 12:52:49 +01:00
mach-spear
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Add machine match for the Allwinner V3 SoC 2020-12-30 11:51:29 +01:00
mach-tango
mach-tegra ARM: tegra: Correct PL310 Auxiliary Control Register initialization 2020-06-22 09:31:22 +02:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zx
mach-zynq
mm ARM: fix build warning in proc-v7-bugs.c 2022-03-11 11:22:38 +01:00
net bpf, arm: Fix register clobbering in div/mod implementation 2021-10-13 10:08:18 +02:00
nwfpe
oprofile
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: samsung: fix PM debug build with DEBUG_LL but !MMU 2020-11-05 11:43:36 +01:00
plat-versatile
probes ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype 2021-11-02 19:46:11 +01:00
tools
vdso
vfp ARM: 9044/1: vfp: use undef hook for VFP support detection 2021-03-24 11:26:35 +01:00
xen Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 12:20:49 +01:00
Kconfig ARM: 9122/1: select HAVE_FUTEX_CMPXCHG 2021-10-27 09:54:29 +02:00
Kconfig-nommu
Kconfig.debug
Makefile ARM: 9156/1: drop cc-option fallbacks for architecture selection 2021-11-17 09:48:48 +01:00