kernel_samsung_a53x/drivers/char
Huai-Yuan Liu f5eb0067fa ppdev: Add an error check in register_device
[ Upstream commit fbf740aeb86a4fe82ad158d26d711f2f3be79b3e ]

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: 9a69645dde11 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:04 +01:00
..
agp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw_random hwrng: core - Fix page fault dead lock on mmap-ed hwrng 2024-11-18 12:12:55 +01:00
ipmi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mwave Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_hwicap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xillybus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm-emulation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
applicom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bsr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds1620.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dsp56k.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dtlk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hangcheck-timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mspec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsc_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvram.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwbutton.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nwflash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pc8736x_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powernv-op-panel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ppdev.c ppdev: Add an error check in register_device 2024-11-19 12:27:04 +01:00
ps3flash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
random.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scx200_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonypi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb0219.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tlclk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
toshiba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttyprintk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uv_mmtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio_console.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00