mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Andy Yan" <andyshrk@163.com>
To: "Liviu Dudau" <liviu.dudau@arm.com>
Cc: "Karunika Choo" <karunika.choo@arm.com>,
	dri-devel@lists.freedesktop.org, nd@arm.com,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Steven Price" <steven.price@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	linux-kernel@vger.kernel.org, aishwarya.tcv@arm.com
Subject: Re:Re: [PATCH] drm/panthor: Fix NULL pointer dereference on panthor_fw_unplug
Date: Mon, 19 Jan 2026 14:33:01 +0800 (CST)	[thread overview]
Message-ID: <4e8c1dcc.54f2.19bd4f4f1ae.Coremail.andyshrk@163.com> (raw)
In-Reply-To: <aUFV6chRKx7aoQ5z@e142607>


Hello,

At 2025-12-16 20:51:53, "Liviu Dudau" <liviu.dudau@arm.com> wrote:
>On Mon, Dec 15, 2025 at 08:33:12PM +0000, Karunika Choo wrote:
>> This patch removes the MCU halt and wait for halt procedures during
>> panthor_fw_unplug() as the MCU can be in a variety of states or the FW
>> may not even be loaded/initialized at all, the latter of which can lead
>> to a NULL pointer dereference.
>> 
>> It should be safe on unplug to just disable the MCU without waiting for
>> it to halt as it may not be able to.
>> 
>> Fixes: 514072549865 ("drm/panthor: Support GLB_REQ.STATE field for Mali-G1 GPUs")
>> Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
>> Signed-off-by: Karunika Choo <karunika.choo@arm.com>
>
>Reviewed-by: Liviu Dudau <liviu@dudau.co.uk>

  Tested-by: Andy Yan <andyshrk@163.com>

Hope can be merged in 6.19 release cycle.


>
>Best regards,
>Liviu
>
>> ---
>>  drivers/gpu/drm/panthor/panthor_fw.c | 4 ----
>>  1 file changed, 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
>> index 4beaa589ba66..a64ec8756bed 100644
>> --- a/drivers/gpu/drm/panthor/panthor_fw.c
>> +++ b/drivers/gpu/drm/panthor/panthor_fw.c
>> @@ -1261,10 +1261,6 @@ void panthor_fw_unplug(struct panthor_device *ptdev)
>>  		if (ptdev->fw->irq.irq)
>>  			panthor_job_irq_suspend(&ptdev->fw->irq);
>>  
>> -		panthor_fw_halt_mcu(ptdev);
>> -		if (!panthor_fw_wait_mcu_halted(ptdev))
>> -			drm_warn(&ptdev->base, "Failed to halt MCU on unplug");
>> -
>>  		panthor_fw_stop(ptdev);
>>  	}
>>  
>> -- 
>> 2.49.0
>> 

  reply	other threads:[~2026-01-19  6:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 20:33 Karunika Choo
2025-12-16 10:39 ` Boris Brezillon
2025-12-16 12:51 ` Liviu Dudau
2026-01-19  6:33   ` Andy Yan [this message]
2026-01-19  8:18     ` Steven Price
2025-12-16 17:32 ` Markus Elfring

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=4e8c1dcc.54f2.19bd4f4f1ae.Coremail.andyshrk@163.com \
    --to=andyshrk@163.com \
    --cc=airlied@gmail.com \
    --cc=aishwarya.tcv@arm.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karunika.choo@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nd@arm.com \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    /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

Powered by JetHome