android_kernel_motorola_sm6375/drivers/misc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tong Zhang d2639ffdca misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge
[ Upstream commit 3ce3e45cc333da707d4d6eb433574b990bcc26f5 ]

There is an issue with the ASPM(optional) capability checking function.
A device might be attached to root complex directly, in this case,
bus->self(bridge) will be NULL, thus priv->parent_pdev is NULL.
Since alcor_pci_init_check_aspm(priv->parent_pdev) checks the PCI link's
ASPM capability and populate parent_cap_off, which will be used later by
alcor_pci_aspm_ctrl() to dynamically turn on/off device, what we can do
here is to avoid checking the capability if we are on the root complex.
This will make pdev_cap_off 0 and alcor_pci_aspm_ctrl() will simply
return when bring called, effectively disable ASPM for the device.

[    1.246492] BUG: kernel NULL pointer dereference, address: 00000000000000c0
[    1.248731] RIP: 0010:pci_read_config_byte+0x5/0x40
[    1.253998] Call Trace:
[    1.254131]  ? alcor_pci_find_cap_offset.isra.0+0x3a/0x100 [alcor_pci]
[    1.254476]  alcor_pci_probe+0x169/0x2d5 [alcor_pci]

Co-developed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20210513040732.1310159-1-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:10:41 +02:00
..
altera-stapl
c2port
cardreader misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge 2021-07-20 16:10:41 +02:00
cb710
cxl cxl: Rework error message for incompatible slots 2020-11-01 12:01:05 +01:00
echo
eeprom eeprom: idt_89hpesx: Restore printing the unsupported fwnode name 2021-07-14 16:53:43 +02:00
genwqe
habanalabs habanalabs: Call put_pid() when releasing control device 2021-03-30 14:35:22 +02:00
ibmasm misc/libmasm/module: Fix two use after free in ibmasm_init_one 2021-07-20 16:10:41 +02:00
lis3lv02d platform/x86: hp_accel: Avoid invoking _INI to speed up resume 2021-06-03 08:59:08 +02:00
lkdtm lkdtm: don't move ctors to .rodata 2021-02-17 10:35:16 +01:00
mei mei: request autosuspend after sending rx flow control 2021-06-03 08:59:03 +02:00
mic misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-10-29 09:58:04 +01:00
ocxl
sgi-gru
sgi-xp
ti-st
vmw_vmci misc: vmw_vmci: explicitly initialize vmci_datagram payload 2021-05-14 09:44:12 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fastrpc.c misc: fastrpc: restrict user apps from sending kernel RPC messages 2021-03-17 17:03:52 +01:00
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c ics932s401: fix broken handling of errors when word reading fails 2021-05-26 12:05:20 +02:00
isl29003.c
isl29020.c
Kconfig
kgdbts.c kgdb: fix gcc-11 warnings harder 2021-06-03 08:59:03 +02:00
lattice-ecp3-config.c
Makefile
pch_phub.c
pci_endpoint_test.c
phantom.c
pti.c
pvpanic.c misc/pvpanic: Export module FDT device table 2021-03-17 17:03:52 +01:00
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c
xilinx_sdfec.c