projects/linux·commit 393ea781

Merge tag 'regmap-fix-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

393ea781 · Linus Torvalds <[email protected]> · 2023-07-15 08:46:09 -07:00

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
Commit
393ea78172cdc68800285cb43855c9531abc26a1
Parents
82678ab2 · 963b54df

Merge commit. Changes below are compared with the first parent: 82678ab2.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/base/regmap/regmap-irq.cmodified+1−1View file

drivers/base/regmap/regmap-irq.c

View file
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index ced0dcf..45fd13e 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);