kernel_samsung_a53x/drivers/iio/magnetometer
zhili.liu fe855d454b iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC
commit 792595bab4925aa06532a14dd256db523eb4fa5e upstream.

Recently, we encounter kernel crash in function rm3100_common_probe
caused by out of bound access of array rm3100_samp_rates (because of
underlying hardware failures). Add boundary check to prevent out of
bound access.

Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100")
Suggested-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: zhili.liu <zhili.liu@ucas.com.cn>
Link: https://lore.kernel.org/r/1704157631-3814-1-git-send-email-zhouzhouyi@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:13:31 +01:00
..
ak8974.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ak8975.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bmc150_magn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bmc150_magn.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bmc150_magn_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bmc150_magn_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sensor-magn-3d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmc5843.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmc5843_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmc5843_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmc5843_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mag3110.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmc35240.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rm3100-core.c iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC 2024-11-18 12:13:31 +01:00
rm3100-i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rm3100-spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rm3100.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_magn.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_magn_buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_magn_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_magn_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_magn_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00