AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nirujogi, Pratap" <pnirujog@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	Pratap Nirujogi <pratap.nirujogi@amd.com>,
	amd-gfx@lists.freedesktop.org, mlimonci@amd.com,
	alexander.deucher@amd.com, christian.koenig@amd.com
Cc: rafael.j.wysocki@intel.com, benjamin.chan@amd.com,
	bin.du@amd.com, king.li@amd.com
Subject: Re: [PATCH v1] drm/amdgpu: Fix ISP segfault in kernel v7.0
Date: Wed, 11 Mar 2026 13:02:26 -0400	[thread overview]
Message-ID: <48fc86a2-7682-4e90-8aa2-ae5c520c2d38@amd.com> (raw)
In-Reply-To: <6f7c5cc5-7aab-42b9-b9ae-5312f3da4e3a@amd.com>



On 3/11/2026 12:47 PM, Mario Limonciello wrote:
> 
> 
> On 3/11/26 11:19, Pratap Nirujogi wrote:
>> Add NULL pointer checks for dev->type before accessing
>> dev->type->name in ISP genpd add/remove functions to
>> prevent kernel crashes.
>>
>> This regression was introduced in v7.0 as the wakeup sources
>> are registered using physical device instead of ACPI device.
>> This led to adding wakeup source device as the first child of
>> AMDGPU device without initializing dev-type variable, and
>> resulted in segfault when accessed it in the amdgpu isp driver.
>>
>> Fixes: 057edc58aa59 ("ACPI: PM: Register wakeup sources under physical 
>> devices")
>> Co-developed-by: Bin Du <Bin.Du@amd.com>
> 
> Did this pass checkpatch?  In order to use C-d-b this should have Bin's 
> S-o-b I would expect too.  If it was just his original idea for the 
> issue and you implemented it a better tag would be Suggested-by.
> 
I missed the warning checkpatch reported, will fix it in v2. Sure, will 
use Suggested-by tag as well.

Thanks,
Pratap

>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c b/drivers/gpu/ 
>> drm/amd/amdgpu/isp_v4_1_1.c
>> index b3590b33cab9e..485ecdec96184 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
>> @@ -129,7 +129,7 @@ static int isp_genpd_add_device(struct device 
>> *dev, void *data)
>>       if (!pdev)
>>           return -EINVAL;
>> -    if (!dev->type->name) {
>> +    if (!dev->type || !dev->type->name) {
>>           drm_dbg(&adev->ddev, "Invalid device type to add\n");
>>           goto exit;
>>       }
>> @@ -165,7 +165,7 @@ static int isp_genpd_remove_device(struct device 
>> *dev, void *data)
>>       if (!pdev)
>>           return -EINVAL;
>> -    if (!dev->type->name) {
>> +    if (!dev->type || !dev->type->name) {
>>           drm_dbg(&adev->ddev, "Invalid device type to remove\n");
>>           goto exit;
>>       }
> 


      reply	other threads:[~2026-03-11 17:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 16:19 [PATCH v1] drm/amdgpu: Fix ISP segfault in kernel v7.0 Pratap Nirujogi
2026-03-11 16:47 ` Mario Limonciello
2026-03-11 17:02   ` Nirujogi, Pratap [this message]

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=48fc86a2-7682-4e90-8aa2-ae5c520c2d38@amd.com \
    --to=pnirujog@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=benjamin.chan@amd.com \
    --cc=bin.du@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=king.li@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=mlimonci@amd.com \
    --cc=pratap.nirujogi@amd.com \
    --cc=rafael.j.wysocki@intel.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