From 3be30bd08dd9d8c40c695f3e5b5f6584a0fe5ec2 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Sat, 6 Feb 2021 18:58:12 +0800 Subject: [PATCH] ASoC: es7202: Add missing sentinel to es7202_dt_ids BUG: KASAN: global-out-of-bounds in of_match_node+0x70/0xc0 Read of size 1 at addr ffffff900a0f06f0 by task swapper/0/1 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.161 #54 Hardware name: Rockchip RK3566 EVB1 DDR4 V10 Board (DT) Call trace: dump_backtrace+0x0/0x1bc show_stack+0x14/0x1c dump_stack+0xd8/0x118 print_address_description+0x80/0x2e4 __kasan_report+0x164/0x1c4 kasan_report+0x10/0x18 __asan_load1+0x4c/0x54 of_match_node+0x70/0xc0 of_match_device+0x30/0x44 i2c_of_match_device+0x30/0xb8 i2c_device_match+0x48/0xc0 __driver_attach+0x44/0x1b0 bus_for_each_dev+0xa0/0xe8 driver_attach+0x30/0x3c bus_add_driver+0x198/0x2a0 driver_register+0xf0/0x1c4 i2c_register_driver+0x6c/0xd0 es7202_modinit+0x1c/0x48 do_one_initcall+0xb0/0x344 do_initcall_level+0xec/0x1fc do_basic_setup+0x68/0x80 kernel_init_freeable+0x108/0x194 kernel_init+0x14/0x2a0 ret_from_fork+0x10/0x18 The buggy address belongs to the variable: es7202_dt_ids+0x190/0x200 Signed-off-by: Tao Huang Change-Id: Ic41116912bc323005787878ab29318ad38efd07e --- sound/soc/codecs/es7202.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/es7202.c b/sound/soc/codecs/es7202.c index 0f9bb8a522cc..38bc78c9dab9 100644 --- a/sound/soc/codecs/es7202.c +++ b/sound/soc/codecs/es7202.c @@ -1047,6 +1047,7 @@ static const struct of_device_id es7202_dt_ids[] = { #if ES7202_CHANNELS_MAX > 14 {.compatible = "ES7202_PDM_ADC_8",}, #endif + {} }; #endif