linux/drivers/pcmcia
Wentao Liang 4a81f78caa pcmcia: Add error handling for add_interval() in do_validate_mem()
In the do_validate_mem(), the call to add_interval() does not
handle errors. If kmalloc() fails in add_interval(), it could
result in a null pointer being inserted into the linked list,
leading to illegal memory access when sub_interval() is called
next.

This patch adds an error handling for the add_interval(). If
add_interval() returns an error, the function will return early
with the error code.

Fixes: 7b4884ca88 ("pcmcia: validate late-added resources")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16 15:49:58 +02:00
..
Kconfig pcmcia: remove PCCARD_IODYN 2025-08-16 15:37:47 +02:00
Makefile pcmcia: remove PCCARD_IODYN 2025-08-16 15:37:47 +02:00
bcm63xx_pcmcia.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bcm63xx_pcmcia.h
cardbus.c PCI: Remove pci_fixup_cardbus() 2025-04-10 09:33:52 -05:00
cirrus.h
cistpl.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
cs.c pcmcia: cs: Remove unused pcmcia_get_socket_by_nr 2025-08-16 15:44:33 +02:00
cs_internal.h pcmcia: cs: Remove unused pcmcia_get_socket_by_nr 2025-08-16 15:44:33 +02:00
db1xxx_ss.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ds.c pcmcia: ds: Emphasize "really" epizeuxis 2025-08-16 15:36:08 +02:00
electra_cf.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
i82092.c pcmcia: add missing MODULE_DESCRIPTION() macros 2024-06-30 15:51:34 +02:00
i82092aa.h PCMCIA/i82092: delete enter/leave macro 2019-12-16 11:49:54 +01:00
i82365.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
i82365.h
max1600.c pcmcia: add missing MODULE_DESCRIPTION() macros 2024-06-30 15:51:34 +02:00
max1600.h
o2micro.h
omap_cf.c pcmcia: omap: Add missing check for platform_get_resource 2025-08-16 15:43:33 +02:00
pcmcia_cis.c pcmcia: hide the MAC address helpers if !NET 2021-11-22 14:02:52 +00:00
pcmcia_resource.c pcmcia: typo fix 2023-09-03 10:45:47 +02:00
pd6729.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
pd6729.h
pxa2xx_base.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
pxa2xx_base.h
pxa2xx_sharpsl.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
ricoh.h
rsrc_mgr.c pcmcia: add missing MODULE_DESCRIPTION() macros 2024-06-30 15:51:34 +02:00
rsrc_nonstatic.c pcmcia: Add error handling for add_interval() in do_validate_mem() 2025-08-16 15:49:58 +02:00
sa11xx_base.c
sa11xx_base.h
sa1100_generic.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
sa1100_generic.h
sa1100_h3600.c ARM: sa1100: remove unused board files 2023-01-12 10:53:12 +01:00
sa1111_generic.c ARM: pxa: remove unused board files 2023-01-20 11:23:44 +01:00
sa1111_generic.h
sa1111_jornada720.c
sa1111_neponset.c
soc_common.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
soc_common.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
socket_sysfs.c pcmcia: Use str_off_on() and str_yes_no() helpers 2025-08-16 15:40:31 +02:00
tcic.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
tcic.h
ti113x.h
topic.h
vg468.h
xxs1500_ss.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
yenta_socket.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
yenta_socket.h