linux-stable/drivers
Bartosz Golaszewski d9f0804ab0 gpio: cdev: check for NULL labels when sanitizing them for irqs
commit b3b9596459 upstream.

We need to take into account that a line's consumer label may be NULL
and not try to kstrdup() it in that case but rather pass the NULL
pointer up the stack to the interrupt request function.

To that end: let make_irq_label() return NULL as a valid return value
and use ERR_PTR() instead to signal an allocation failure to callers.

Cc: stable@vger.kernel.org
Fixes: b34490879b ("gpio: cdev: sanitize the label before requesting the interrupt")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/lkml/20240402093534.212283-1-naresh.kamboju@linaro.org/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:36:01 +02:00
..
accel
accessibility speakup: Fix 8bit characters from direct synth 2024-04-03 15:28:28 +02:00
acpi ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() 2024-04-10 16:35:42 +02:00
amba
android
ata ata: sata_mv: Fix PCI device ID table declaration compilation warning 2024-04-10 16:36:01 +02:00
atm
auxdisplay
base regmap: maple: Fix uninitialized symbol 'ret' warnings 2024-04-10 16:36:00 +02:00
bcma
block
bluetooth Bluetooth: qca: fix device-address endianness 2024-04-10 16:35:48 +02:00
bus bus: mhi: ep: check the correct variable in mhi_ep_register_controller() 2024-03-26 18:20:06 -04:00
cache
cdrom
cdx
char tpm,tpm_tis: Avoid warning splat at shutdown 2024-04-03 15:28:31 +02:00
clk clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays 2024-04-03 15:28:23 +02:00
clocksource clocksource/drivers/arm_global_timer: Fix maximum prescaler value 2024-04-03 15:28:50 +02:00
comedi
connector
counter
cpufreq cpufreq: dt: always allocate zeroed cpumask 2024-04-03 15:28:35 +02:00
cpuidle
crypto crypto: sun8i-ce - Fix use after free in unprepare 2024-04-03 15:28:40 +02:00
cxl cxl/trace: Properly initialize cxl_poison region name 2024-04-03 15:28:36 +02:00
dax
dca
devfreq
dio
dma
dma-buf dma-buf: Fix NULL pointer dereference in sanitycheck() 2024-04-10 16:35:40 +02:00
edac
eisa
extcon
firewire firewire: ohci: prevent leak of left-over IRQ on unbind 2024-04-03 15:28:41 +02:00
firmware x86/efistub: Reinstate soft limit for initrd loading 2024-04-03 15:28:53 +02:00
fpga
fsi
gnss
gpio gpio: cdev: check for NULL labels when sanitizing them for irqs 2024-04-10 16:36:01 +02:00
gpu drm/prime: Unbreak virtgpu dma-buf export 2024-04-10 16:35:58 +02:00
greybus
hid
hsi
hte
hv x86/hyperv: Use per cpu initial stack for vtl context 2024-03-26 18:20:06 -04:00
hwmon hwmon: (amc6821) add of_match table 2024-04-03 15:28:28 +02:00
hwspinlock
hwtracing hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init() 2024-03-26 18:20:06 -04:00
i2c i2c: i801: Avoid potential double call to gpiod_remove_lookup_table 2024-04-03 15:28:45 +02:00
i3c
idle
iio iio: imu: inv_mpu6050: fix FIFO parsing when empty 2024-04-03 15:28:45 +02:00
infiniband
input Input: xpad - add additional HyperX Controller Identifiers 2024-04-03 15:28:41 +02:00
interconnect
iommu iommu/dma: Force swiotlb_max_mapping_size on an untrusted device 2024-04-03 15:28:51 +02:00
ipack
irqchip irqchip/renesas-rzg2l: Prevent spurious interrupts when setting trigger type 2024-04-03 15:28:52 +02:00
isdn
leds leds: trigger: netdev: Fix kernel panic on interface rename trig notify 2024-04-03 15:28:27 +02:00
macintosh
mailbox
mcb
md dm integrity: fix out-of-range warning 2024-04-10 16:35:45 +02:00
media media: nxp: imx8-isi: Mark all crossbar sink pads as MUST_CONNECT 2024-04-03 15:28:18 +02:00
memory
memstick
message
mfd
misc mei: me: add arrow lake point H DID 2024-04-03 15:28:43 +02:00
mmc sdhci-of-dwcmshc: disable PM runtime in dwcmshc_remove() 2024-04-03 15:28:56 +02:00
most
mtd mtd: rawnand: Constrain even more when continuous reads are enabled 2024-04-03 15:28:35 +02:00
mux
net ice: fix typo in assignment 2024-04-10 16:36:01 +02:00
nfc
ntb
nubus
nvdimm
nvme nvme: fix reconnection fail due to reserved tag allocation 2024-03-26 18:20:09 -04:00
nvmem nvmem: meson-efuse: fix function pointer type mismatch 2024-04-03 15:28:28 +02:00
of
opp
parisc
parport
pci PCI: hv: Fix ring buffer size calculation 2024-04-03 15:28:30 +02:00
pcmcia
peci
perf drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported 2024-04-10 16:35:58 +02:00
phy phy: tegra: xusb: Add API to retrieve the port number of phy 2024-04-03 15:28:28 +02:00
pinctrl
platform platform/x86/intel/tpmi: Change vsec offset to u64 2024-04-03 15:28:31 +02:00
pmdomain
pnp
power
powercap powercap: intel_rapl_tpmi: Fix System Domain probing 2024-04-03 15:28:19 +02:00
pps
ps3
ptp
pwm pwm: img: fix pwm clock lookup 2024-04-03 15:28:52 +02:00
rapidio
ras
regulator
remoteproc remoteproc: virtio: Fix wdg cannot recovery remote processor 2024-04-03 15:28:16 +02:00
reset
rpmsg
rtc rtc: mt6397: select IRQ_DOMAIN instead of depending on it 2024-03-26 18:20:06 -04:00
s390 s390/qeth: handle deferred cc1 2024-04-10 16:35:42 +02:00
sbus
scsi scsi: sd: Unregister device if device_add_disk() failed in sd_probe() 2024-04-10 16:36:00 +02:00
sh
siox
slimbus slimbus: core: Remove usage of the deprecated ida_simple_xx() API 2024-04-03 15:28:28 +02:00
soc soc: fsl: qbman: Use raw spinlock for cgr_lock 2024-04-03 15:28:32 +02:00
soundwire
spi spi: mchp-pci1xxx: Fix a possible null pointer dereference in pci1xxx_spi_probe 2024-04-10 16:36:01 +02:00
spmi
ssb
staging staging: vc04_services: fix information leak in create_component() 2024-04-03 15:28:59 +02:00
target
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-04-03 15:28:44 +02:00
thermal thermal: devfreq_cooling: Fix perf state when calculate dfc res_util 2024-04-03 15:28:56 +02:00
thunderbolt
tty Revert "tty: serial: simplify qcom_geni_serial_send_chunk_fifo()" 2024-04-03 15:28:43 +02:00
ufs
uio
usb usb: typec: ucsi: Fix race between typec_switch and role_switch 2024-04-10 16:35:54 +02:00
vdpa vdpa/mlx5: Allow CVQ size changes 2024-03-26 18:20:10 -04:00
vfio vfio/pds: Make sure migration file isn't accessed after reset 2024-04-03 15:28:59 +02:00
vhost
video
virt
virtio virtio: reenable config if freezing device failed 2024-04-03 15:28:36 +02:00
vlynq
w1
watchdog
xen xen/events: increment refcnt only if event channel is refcounted 2024-03-26 18:20:09 -04:00
zorro
Kconfig
Makefile