From: Shree Ramamoorthy <s-ramamoorthy@ti.com>
To: Robert Nelson <robertcnelson@gmail.com>
Cc: <aaro.koskinen@iki.fi>, <andreas@kemnade.info>,
<khilman@baylibre.com>, <rogerq@kernel.org>, <tony@atomide.com>,
<lee@kernel.org>, <d-gole@ti.com>, <jkridner@gmail.com>,
<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<m-leonard@ti.com>, <praneeth@ti.com>, <afd@ti.com>
Subject: Re: [PATCH] regulator: tps65219: Fix devm_kmalloc size allocation
Date: Fri, 20 Jun 2025 10:22:02 -0500 [thread overview]
Message-ID: <bdb6de80-d65e-4f86-8bc0-cc0d127ab8a6@ti.com> (raw)
In-Reply-To: <CAOCHtYjYTfrJ_pNCsQOXX7Hj6A7wBXKdMQYvog-5h-=WLtorhw@mail.gmail.com>
On 6/20/2025 9:52 AM, Robert Nelson wrote:
> On Fri, Jun 20, 2025 at 8:30 AM Robert Nelson <robertcnelson@gmail.com> wrote:
>> On Thu, Jun 19, 2025 at 7:09 PM Shree Ramamoorthy <s-ramamoorthy@ti.com> wrote:
>>> In probe(), devm_kmalloc uses pmic->common_irq_size to allocate an array of
>>> 2 bytes, but pmic->common_irq_size is being used like an array of structs.
>>> The param sent should've been pmic->common_irq_size * sizeof(*irq_data).
>>> This led to an issue with the kmalloc'd buffer being corrupted and EVM boot
>>> issues. The common and device-specific structs are now allocated one at a
>>> time within the loop.
>>>
>>> Fixes: 38c9f98db20a ("regulator: tps65219: Add support for TPS65215 Regulator IRQs")
>>> Reported-by: Dhruva Gole <d-gole@ti.com>
>>> Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
> Sweet! With 4 PB2's and 2 BeaglePlays... Power on, boot, Power off,
> wait 30 seconds.. (repeat 10 times)
>
> Before:
> 36/60: Bootup to File System
>
> After
> 60/60: Bootup to File System
>
> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>
> SInce i applied directly to rc2, here's my fixup of your patch for
> reference: https://github.com/RobertCNelson/arm64-multiplatform/blob/v6.16.x-arm64-k3/patches/fixes/0001-regulator-tps65219-Fix-devm_kmalloc-size-allocation.patch
>
> For TI, we also need to cherry pick this in v6.12.x-ti, to fix
> BeaglePlay and PB2..
>
> Thanks Everyone!
Awesome! Glad to hear this resolved those boards :) I will backport this to ti-6.12y-cicd as well.
>
next prev parent reply other threads:[~2025-06-20 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 0:09 Shree Ramamoorthy
2025-06-20 13:30 ` Robert Nelson
2025-06-20 14:52 ` Robert Nelson
2025-06-20 15:22 ` Shree Ramamoorthy [this message]
2025-06-20 15:19 ` Shree Ramamoorthy
2025-06-20 14:58 ` Andrew Davis
2025-06-20 15:22 ` Shree Ramamoorthy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdb6de80-d65e-4f86-8bc0-cc0d127ab8a6@ti.com \
--to=s-ramamoorthy@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=afd@ti.com \
--cc=andreas@kemnade.info \
--cc=d-gole@ti.com \
--cc=jkridner@gmail.com \
--cc=khilman@baylibre.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=m-leonard@ti.com \
--cc=praneeth@ti.com \
--cc=robertcnelson@gmail.com \
--cc=rogerq@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®