aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Shubin <nikita.shubin@maquefel.me>2024-04-10 07:59:18 +0000
committeropeneuler-sync-bot <openeuler.syncbot@gmail.com>2024-04-11 19:34:17 +0800
commit8331bd0e8d156823efdf5a6ed3372714029ab313 (patch)
tree3995491b2682796c4fde7cb4f2eadd942145a232
parenta8eb7f6d004319a4a595202028d143113ed50710 (diff)
downloadopenEuler-kernel-8331bd0e8d156823efdf5a6ed3372714029ab313.tar.gz
ARM: ep93xx: Add terminator to gpiod_lookup_table
stable inclusion from stable-v5.10.211 commit 70d92abbe29692a3de8697ae082c60f2d21ab482 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9E2O0 CVE: CVE-2024-26751 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=70d92abbe29692a3de8697ae082c60f2d21ab482 -------------------------------- Without the terminator, if a con_id is passed to gpio_find() that does not exist in the lookup table the function will not stop looping correctly, and eventually cause an oops. Cc: stable@vger.kernel.org Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors") Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20240205102337.439002-1-alexander.sverdlin@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com> (cherry picked from commit f2019796562a154044728afe0c80a71713fd55ec)
-rw-r--r--arch/arm/mach-ep93xx/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 6fb19a393fd2e4..c06ae33dc53ec2 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -337,6 +337,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
GPIO_LOOKUP_IDX("G", 0, NULL, 1,
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+ { }
},
};