linux-yocto/drivers/i2c
Michael J. Ruhl 4c37963d67 i2c/designware: Fix an initialization issue
commit 3d30048958 upstream.

The i2c_dw_xfer_init() function requires msgs and msg_write_idx from the
dev context to be initialized.

amd_i2c_dw_xfer_quirk() inits msgs and msgs_num, but not msg_write_idx.

This could allow an out of bounds access (of msgs).

Initialize msg_write_idx before calling i2c_dw_xfer_init().

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 17631e8ca2 ("i2c: designware: Add driver support for AMD NAVI GPU")
Cc: <stable@vger.kernel.org> # v5.13+
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250627143511.489570-1-michael.j.ruhl@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-10 16:05:12 +02:00
..
algos i2c: algo: bit: allow getsda to be NULL 2023-01-23 23:15:49 +01:00
busses i2c/designware: Fix an initialization issue 2025-07-10 16:05:12 +02:00
muxes i2c: mux: demux-pinctrl: check initial mux selection, too 2025-01-23 17:22:54 +01:00
i2c-atr.c i2c: atr: Fix wrong include 2025-04-25 10:47:51 +02:00
i2c-boardinfo.c
i2c-core-acpi.c i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz 2025-02-17 10:04:52 +01:00
i2c-core-base.c i2c: core: fix reference leak in i2c_register_adapter() 2025-01-23 17:22:53 +01:00
i2c-core-of.c Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
i2c-core-slave.c i2c: simplify with scoped for each OF child loop 2024-09-03 12:01:52 +02:00
i2c-core-smbus.c
i2c-core.h i2c: core: Fix atomic xfer check for non-preempt config 2024-01-06 14:10:10 +01:00
i2c-dev.c i2c: dev: Fix memory leak when underlying adapter does not support I2C 2024-12-05 14:01:58 +01:00
i2c-mux.c i2c: mux: Remove class argument from i2c_mux_add_adapter() 2024-05-13 16:13:19 +02:00
i2c-slave-eeprom.c i2c: Convert drivers to new .probe() callback 2023-03-09 21:59:30 +01:00
i2c-slave-testunit.c i2c: testunit: on errors, repeat NACK until STOP 2025-01-23 17:22:54 +01:00
i2c-smbus.c i2c: smbus: Send alert notifications to all devices if source not found 2024-08-04 16:29:34 +02:00
i2c-stub.c i2c: stub: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON 2024-01-18 21:10:41 +01:00
Kconfig i2c: Remove I2C_COMPAT config symbol and related code 2024-09-07 18:31:28 +02:00
Makefile media: i2c: add I2C Address Translator (ATR) support 2023-07-14 13:11:44 +02:00