From: Gabor Juhos <j4g8y7@gmail.com>
To: Johan Hovold <johan@kernel.org>
Cc: Georgi Djakov <djakov@kernel.org>,
Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>,
Johan Hovold <johan+linaro@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] interconnect: avoid memory allocation when 'icc_bw_lock' is held
Date: Fri, 27 Jun 2025 11:36:26 +0200 [thread overview]
Message-ID: <b960680d-6c5a-4130-b2dd-4ddf1f800430@gmail.com> (raw)
In-Reply-To: <aF5EPhd5smrmB38Q@hovoldconsulting.com>
2025. 06. 27. 9:11 keltezéssel, Johan Hovold írta:
> On Thu, Jun 26, 2025 at 05:00:42PM +0200, Gabor Juhos wrote:
>> 2025. 06. 26. 11:30 keltezéssel, Johan Hovold írta:
>
>>> Note that this could be extended with a
>>> name-allocated flag and an appropriate warning somewhere later if anyone
>>> is worried about drivers failing to use the helper.
>>>
>>> Note that we can't use kfree_const() unconditionally as I initially
>>> intended as apparently some interconnect providers already allocate
>>> names for non-dynamic nodes.
>>
>> Not that I want to worry about anything, but for the sake of completeness I have
>> to note something. Theoretically, freeing the name in icc_node_destroy() could
>> cause the following on IPQ9574 under some circumstances:
>>
>> [ 4.003692] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffff80047e4180 pfn:0x447e4
>> [ 4.008439] flags: 0x0(zone=0)
>> [ 4.017545] raw: 0000000000000000 fffffffec0000448 ffffff803fdbb518 0000000000000000
>> [ 4.020480] raw: ffffff80047e4180 0000000000150000 00000000ffffffff 0000000000000000
>> [ 4.028413] page dumped because: Not a kmalloc allocation
>>
>> It is not a problem of your patch though. The root cause of this is the same
>> as why I saw the lockdep warning on the platform originally. The reason is
>> that the static node ids used by the 'nsscc-ipq9574' driver are within the
>> range of dynamic ids. Nevertheless, I have sent a patch [1] to fix that
>> already.
>
> Yeah, I saw that patch of yours the other day. Good that you tracked
> that down. I'll probably amend the commit message with a comment about
> why this triggered on IPQ in the first place too.
>
>> Despite the note above, your proposal looks good to me. Would you like to
>> send it as a formal patch, or shall I do it?
>
> I can post it in a bit.
Great, just saw the final patch. Thank you!
Regards,
Gabor
next prev parent reply other threads:[~2025-06-27 9:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 11:25 [PATCH v3] interconnect: avoid memory allocation when 'icc_bw_lock' is held Gabor Juhos
2025-06-25 12:30 ` Johan Hovold
2025-06-25 12:41 ` Johan Hovold
2025-06-25 13:15 ` Gabor Juhos
2025-06-25 14:02 ` Johan Hovold
2025-06-25 15:35 ` Gabor Juhos
2025-06-26 9:30 ` Johan Hovold
2025-06-26 15:00 ` Gabor Juhos
2025-06-27 7:11 ` Johan Hovold
2025-06-27 9:36 ` Gabor Juhos [this message]
2025-06-27 9:43 ` Johan Hovold
2025-06-27 12:23 ` Gabor Juhos
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=b960680d-6c5a-4130-b2dd-4ddf1f800430@gmail.com \
--to=j4g8y7@gmail.com \
--cc=bryan.odonoghue@linaro.org \
--cc=djakov@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=johan@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=quic_rlaggysh@quicinc.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