mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jian Hui Lee <jianhui.lee@canonical.com>
Cc: Yong Wu <yong.wu@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Joerg Roedel <jroedel@suse.de>,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] memory: mtk-smi: Fix NULL pointer dereference in config_port
Date: Fri, 14 Nov 2025 08:21:29 +0100	[thread overview]
Message-ID: <13d96b3c-4db6-48f5-b1bb-68171ffa6bc0@kernel.org> (raw)
In-Reply-To: <CAGmiHmGiDngNCkfkwdoV8M0XjQVFEXTJekPAfuZfUFRui9gSbg@mail.gmail.com>

On 14/11/2025 04:03, Jian Hui Lee wrote:
> On Wed, Nov 12, 2025 at 11:51 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> Please trim the traces from all irrelevant information.
>>
>>>
>>> Fixes: e6dec92308628 ("iommu/mediatek: Add mt2712 IOMMU support")
>>
>> Add Cc stable.
>>
>>> Signed-off-by: Jian Hui Lee <jianhui.lee@canonical.com>
>>
>>> ---
>>>  drivers/memory/mtk-smi.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
>>> index 733e22f695ab..8eb043ff8280 100644
>>> --- a/drivers/memory/mtk-smi.c
>>> +++ b/drivers/memory/mtk-smi.c
>>> @@ -244,6 +244,10 @@ static int mtk_smi_larb_config_port_gen2_general(struct device *dev)
>>>       struct arm_smccc_res res;
>>>       int i;
>>>
>>> +     /* larb->mmu and larb->bank are set in bind(), may not be ready yet */
>>
>> And how do you synchronize this between CPUs? IOW, what certainty you
>> have that this CPU sees correct data and the checks below have any sense?
> 
> Thank you for the review and for pointing this out. Moving
> pm_runtime_enable/disable to component bind/unbind should ensure that
> the synchronization happens correctly. I will send a v2 to address
> those you mentioned.

Runtime PM synchronizes nothing in this matter, so I don't understand
what you want to achieve with it.

Best regards,
Krzysztof

  reply	other threads:[~2025-11-14  7:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 12:48 Jian Hui Lee
2025-11-12 15:51 ` Krzysztof Kozlowski
2025-11-14  3:03   ` Jian Hui Lee
2025-11-14  7:21     ` Krzysztof Kozlowski [this message]
2025-11-18  6:15       ` Jian Hui Lee

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=13d96b3c-4db6-48f5-b1bb-68171ffa6bc0@kernel.org \
    --to=krzk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=jianhui.lee@canonical.com \
    --cc=jroedel@suse.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=yong.wu@mediatek.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®