Commit ca0e36e
regulator: tps6594-regulator: Fix random kernel crash
Random kernel crash detected in TI CICD when regulator driver is added.
This is root caused to irq index increment being done twice causing
irq_data being allocated outside of the range.
- Rework tps6594_request_reg_irqs with correct index increment
- Adjust irq_data kmalloc size to the exact size needed for the device
This has been reported on TI mainline. No public bug report associated.
Reported-by: Udit Kumar <u-kumar1@ti.com>
Fixes: f17ccc5 ("regulator: tps6594-regulator: Add driver for TI TPS6594 regulators")
Signed-off-by: Jerome Neanne <jneanne@baylibre.com>
Link: https://lore.kernel.org/r/20230828-tps6594_random_boot_crash_fix-v1-1-f29cbf9ddb37@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent c692905 commit ca0e36e
1 file changed
Lines changed: 15 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 392 | + | |
| 393 | + | |
397 | 394 | | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | 398 | | |
| 399 | + | |
402 | 400 | | |
403 | 401 | | |
404 | 402 | | |
| |||
420 | 418 | | |
421 | 419 | | |
422 | 420 | | |
423 | | - | |
424 | | - | |
| 421 | + | |
| 422 | + | |
425 | 423 | | |
426 | 424 | | |
427 | 425 | | |
| |||
484 | 482 | | |
485 | 483 | | |
486 | 484 | | |
487 | | - | |
| 485 | + | |
488 | 486 | | |
489 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
490 | 492 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 493 | + | |
| 494 | + | |
496 | 495 | | |
497 | 496 | | |
498 | 497 | | |
| |||
0 commit comments