linux/drivers/char
Huai-Yuan Liu fbf740aeb8 ppdev: Add an error check in register_device
In register_device, the return value of ida_simple_get is unchecked,
in witch ida_simple_get will use an invalid index value.

To address this issue, index should be checked after ida_simple_get. When
the index value is abnormal, a warning message should be printed, the port
should be dropped, and the value should be recorded.

Fixes: 9a69645dde ("ppdev: fix registering same device name")
Signed-off-by: Huai-Yuan Liu <qq810974084@gmail.com>
Link: https://lore.kernel.org/r/20240412083840.234085-1-qq810974084@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:59:38 +02:00
..
agp char/agp: remove agp_bridge_data::type 2024-02-16 18:07:13 +01:00
hw_random This update includes the following changes: 2024-03-15 14:46:54 -07:00
ipmi ipmi: Remove usage of the deprecated ida_simple_xx() API 2023-12-19 06:33:45 -06:00
mwave char/mwave: Adjust io port register size 2021-12-03 14:27:06 +01:00
tpm - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
xilinx_hwicap char: xilinx_hwicap: Fix NULL vs IS_ERR() bug 2024-03-07 21:48:38 +00:00
xillybus char: xillybus: Convert to platform remove callback returning void 2024-03-07 21:49:30 +00:00
adi.c
apm-emulation.c apm-emulation: drop unexpected word "the" in the comments 2022-06-27 16:15:27 +02:00
applicom.c applicom: Fix PCI device refcount leak in applicom_init() 2023-01-20 13:05:39 +01:00
applicom.h
bsr.c char: Explicitly include correct DT includes 2023-07-30 18:15:27 +02:00
ds1620.c
dsp56k.c dsp56k: make dsp56k_class a static const structure 2023-06-23 10:27:08 +02:00
dtlk.c
hangcheck-timer.c
hpet.c hpet: remove hpets::hp_clocksource 2024-03-07 21:48:00 +00:00
Kconfig arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
lp.c char: lp: make lp_class a static const structure 2023-06-23 10:27:11 +02:00
Makefile arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
mem.c /dev/port: don't compile file operations without CONFIG_DEVPORT 2024-04-11 15:26:55 +02:00
misc.c char: misc: make misc_class a static const structure 2023-06-23 10:27:15 +02:00
nsc_gpio.c
nvram.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c powerpc/powernv: Convert to platform remove callback returning void 2024-04-11 15:26:59 +02:00
ppdev.c ppdev: Add an error check in register_device 2024-05-04 18:59:38 +02:00
ps3flash.c powerpc/ps3: make system bus's remove and shutdown callbacks return void 2020-12-04 01:01:22 +11:00
random.c random: handle creditable entropy from atomic process context 2024-04-17 13:53:18 +02:00
scx200_gpio.c
sonypi.c sonypi: Convert to platform remove callback returning void 2024-04-11 15:27:02 +02:00
tlclk.c
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c tty: ttyprintk: convert to u8 and size_t 2023-12-08 12:02:38 +01:00
uv_mmtimer.c
virtio_console.c tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00