summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-15 17:46:09 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-15 17:46:09 +0200
commit393ea78172cdc68800285cb43855c9531abc26a1 (patch)
tree036797ebfed5c37b44ef83599e990cba69d385a3 /drivers
parentMerge tag 'iommu-fixes-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
parentregmap-irq: Fix out-of-bounds access when allocating config buffers (diff)
downloadlinux-393ea78172cdc68800285cb43855c9531abc26a1.tar.xz
linux-393ea78172cdc68800285cb43855c9531abc26a1.zip
Merge tag 'regmap-fix-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap fix from Mark Brown: "One fix for an out of bounds access in the interupt code here" * tag 'regmap-fix-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: Fix out-of-bounds access when allocating config buffers
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regmap-irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index ced0dcf86e0b..45fd13ef13fc 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -717,7 +717,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
if (!d->config_buf)
goto err_alloc;
- for (i = 0; i < chip->num_config_regs; i++) {
+ for (i = 0; i < chip->num_config_bases; i++) {
d->config_buf[i] = kcalloc(chip->num_config_regs,
sizeof(**d->config_buf),
GFP_KERNEL);