linux-stable/drivers
Andy Shevchenko 3345cc5f02 serial: 8250_port: Check IRQ data before use
commit cce7fc8b29 upstream.

In case the leaf driver wants to use IRQ polling (irq = 0) and
IIR register shows that an interrupt happened in the 8250 hardware
the IRQ data can be NULL. In such a case we need to skip the wake
event as we came to this path from the timer interrupt and quite
likely system is already awake.

Without this fix we have got an Oops:

    serial8250: ttyS0 at I/O 0x3f8 (irq = 0, base_baud = 115200) is a 16550A
    ...
    BUG: kernel NULL pointer dereference, address: 0000000000000010
    RIP: 0010:serial8250_handle_irq+0x7c/0x240
    Call Trace:
     ? serial8250_handle_irq+0x7c/0x240
     ? __pfx_serial8250_timeout+0x10/0x10

Fixes: 0ba9e3a13c ("serial: 8250: Add missing wakeup event reporting")
Cc: stable <stable@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230831222555.614426-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-06 13:16:21 +02:00
..
accel accel/ivpu: Use cached buffers for FW loading 2023-10-06 13:16:06 +02:00
accessibility
acpi
amba
android
ata scsi: core: ata: Do no try to probe for CDL on old drives 2023-10-06 13:16:21 +02:00
atm
auxdisplay
base
bcma
block
bluetooth
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 13:16:03 +02:00
cdrom
cdx
char parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-06 13:16:08 +02:00
clk clk: tegra: fix error return case for recalc_rate 2023-10-06 13:16:02 +02:00
clocksource
comedi Revert "comedi: add HAS_IOPORT dependencies" 2023-09-23 11:14:37 +02:00
connector
counter
cpufreq
cpuidle
crypto
cxl cxl/region: Match auto-discovered region decoders by HPA range 2023-10-06 13:15:59 +02:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire Revert "firewire: core: obsolete usage of GFP_ATOMIC at building node tree" 2023-09-23 11:14:34 +02:00
firmware firmware: cirrus: cs_dsp: Only log list of algorithms in debug build 2023-10-06 13:16:15 +02:00
fpga
fsi
gnss
gpio gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip 2023-10-06 13:16:06 +02:00
gpu drm/amdgpu: Handle null atom context in VBIOS info ioctl 2023-10-06 13:16:12 +02:00
greybus
hid
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c i2c: designware: fix __i2c_dw_disable() in case master is holding SCL low 2023-10-06 13:16:18 +02:00
i3c
idle
iio
infiniband
input
interconnect interconnect: Teach lockdep about icc_bw_lock order 2023-09-23 11:14:39 +02:00
iommu iommu/arm-smmu-v3: Fix soft lockup triggered by arm_smmu_mm_invalidate_range 2023-10-06 13:16:18 +02:00
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md dm: fix a race condition in retrieve_deps 2023-09-23 11:14:35 +02:00
media media: vb2: frame_vector.c: replace WARN_ONCE with a comment 2023-10-06 13:16:16 +02:00
memory
memstick
message
mfd
misc misc: rtsx: Fix some platforms can not boot and move the l1ss judgment to probe 2023-10-06 13:16:20 +02:00
mmc
most
mtd mtd: spi-nor: spansion: preserve CFR2V[7] when writing MEMLAT 2023-09-23 11:14:31 +02:00
mux
net tsnep: Fix NAPI polling with budget 0 2023-10-06 13:16:17 +02:00
nfc
ntb
nubus
nvdimm
nvme nvme-pci: do not set the NUMA node of device if it has none 2023-10-06 13:16:12 +02:00
nvmem
of
opp
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:16:08 +02:00
parport
pci PCI: fu740: Set the number of MSI vectors 2023-09-23 11:14:27 +02:00
pcmcia
peci
perf
phy
pinctrl
platform platform/x86: asus-wmi: Support 2023 ROG X16 tablet mode 2023-10-06 13:16:10 +02:00
pnp
power power: supply: rk817: Fix node refcount leak 2023-10-06 13:16:04 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi scsi: core: ata: Do no try to probe for CDL on old drives 2023-10-06 13:16:21 +02:00
sh
siox
slimbus
soc soc: imx8m: Enable OCOTP clock for imx8mm before reading registers 2023-10-06 13:16:05 +02:00
soundwire
spi spi: zynqmp-gqspi: fix clock imbalance on probe failure 2023-10-06 13:16:19 +02:00
spmi
ssb
staging
target scsi: target: core: Fix target_cmd_counter leak 2023-09-23 11:14:32 +02:00
tc
tee
thermal thermal/of: add missing of_node_put() 2023-10-06 13:16:11 +02:00
thunderbolt
tty serial: 8250_port: Check IRQ data before use 2023-10-06 13:16:21 +02:00
ufs scsi: ufs: core: Poll HCS.UCRDY before issuing a UIC command 2023-10-06 13:16:09 +02:00
uio
usb usb: typec: qcom-pmic-typec: register drm_bridge 2023-09-23 11:14:29 +02:00
vdpa
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 13:16:01 +02:00
vhost
video fbdev/sh7760fb: Depend on FB=y 2023-10-06 13:16:18 +02:00
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile