lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a681e496-4979-4f4a-9f79-9636d9496fa3@collabora.com>
Date: Tue, 18 Jun 2024 13:47:53 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
 "jassisinghbrar@...il.com" <jassisinghbrar@...il.com>,
 "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
Cc: "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>,
 "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
 Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
 "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Singo Chang (張興國) <Singo.Chang@...iatek.com>,
 Project_Global_Chrome_Upstream_Group
 <Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: Re: [PATCH] mailbox: mtk-cmdq: Add unregister mailbox controller in
 cmdq_remove()

Il 18/06/24 05:28, Jason-JH Lin (林睿祥) ha scritto:
> Hi Angelo,
> 
> On Fri, 2024-06-14 at 00:52 +0800, Jason-JH.Lin wrote:
>> Hi Angelo,
>>
>> On Thu, 2024-06-13 at 17:10 +0200, AngeloGioacchino Del Regno wrote:
>>> Il 13/06/24 17:06, Jason-JH.Lin ha scritto:
>>>> Add unregister mailbox controller in cmdq_remove to fix cmdq
>>>> unbind
>>>> WARN_ON message from pm_runtime_get_sync() in
>>>> cmdq_mbox_shutdown().
>>>>
>>>> Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ
>>>> driver")
>>>> Signed-off-by: Jason-JH.Lin <jason-jh.lin@...iatek.com>
>>>
>>> Hello,
>>>
>>> I think you forgot about...
>>>
>>>
>>
>>
> https://lore.kernel.org/all/6fcd48b14e865c25e6db7559fe6b946537bfa0ce.camel@mediatek.com/
>>>
>>
>> I'll send this series next week after testing it.
>>
>>
>>> ...as that would also resolve this one without any hacks.
>>
>> I thought it was another problem, so I sent this patch.
>>
>> After looking to the kerneldoc of devm_mbox_controller_unregister(),
>> I
>> found that it's not necessary to call this anywhere.
>>
>> I'll drop this patch. Thanks for the review.
> 
> I found that the series of "Move pm_runimte_get and put to
> mbox_chan_ops API" can not fix this unbind crash issue.
> 
> It seems they are 2 different issues.
> 
> So I think calling devm_mbox_controller_unregister() in cmdq_remove()
> can ensure the CMDQ device is not removed and be paired to
> cmdq_probe().
> 

Can you please paste the stack trace of that warning that you're seeing when
calling cmdq_remove()?

I'm not convinced that this is the best solution - it might be, but I have
a hunch that there might be a better way to address this issue.

Thanks!
Angelo

> Regards,
> Jason-JH.Lin
> 
>>
>> Regards,
>> Jason-JH.Lin
>>
>>>
>>> Cheers,
>>> Angelo
>>>
>>>> ---
>>>>    drivers/mailbox/mtk-cmdq-mailbox.c | 2 ++
>>>>    1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
>>>> b/drivers/mailbox/mtk-cmdq-mailbox.c
>>>> index 4aa394e91109..1399e18a39a4 100644
>>>> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
>>>> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
>>>> @@ -371,6 +371,8 @@ static void cmdq_remove(struct
>>>> platform_device
>>>> *pdev)
>>>>    {
>>>>    	struct cmdq *cmdq = platform_get_drvdata(pdev);
>>>>    
>>>> +	devm_mbox_controller_unregister(&pdev->dev, &cmdq->mbox);
>>>> +
>>>>    	if (cmdq->pdata->sw_ddr_en)
>>>>    		cmdq_sw_ddr_enable(cmdq, false);
>>>>    
>>>
>>>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ