All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Schnelle <niks@kernel.org>
To: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
	broonie@kernel.org, alsa-devel@alsa-project.org
Cc: Vijendar.Mukunda@amd.com, Basavaraj.Hiregoudar@amd.com,
	Sunil-kumar.Dommati@amd.com, syed.sabakareem@amd.com,
	mario.limonciello@amd.com, "Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
	<linux-sound@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] ASoC: amd: acp: Fix NULL pointer deref on acp resume path
Date: Fri, 02 May 2025 00:16:59 +0200	[thread overview]
Message-ID: <3ba81b7f7859de8ac64e4cf07cc5aa21c3850ae9.camel@kernel.org> (raw)
In-Reply-To: <20250425060144.1773265-1-venkataprasad.potturu@amd.com>

On Fri, 2025-04-25 at 11:31 +0530, Venkata Prasad Potturu wrote:
> update chip data using dev_get_drvdata(dev->parent) instead of
> dev_get_platdata(dev).
> 
> BUG: kernel NULL pointer dereference, address: 0000000000000010
> Call Trace:
>  <TASK>
>  ? __pfx_platform_pm_resume+0x10/0x10
>  platform_pm_resume+0x28/0x60
>  dpm_run_callback+0x51/0x1a0
>  device_resume+0x1a6/0x2b0
>  dpm_resume+0x168/0x230
> 
> Fixes: e3933683b25e ("ASoC: amd: acp: Remove redundant acp_dev_data structure")
> 
> Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>

This is the first time I see an empty line between the Fixes and the
Signed-off-by tags. I checked checkpatch.pl --strict and that doesn't
complain, but I'm curious now, is that a subsystem thing since you have
it in all 3 patches?

> ---
>  sound/soc/amd/acp/acp-rembrandt.c | 2 +-
>  sound/soc/amd/acp/acp-renoir.c    | 2 +-
>  sound/soc/amd/acp/acp63.c         | 2 +-
>  sound/soc/amd/acp/acp70.c         | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
--- snip ---
> index 6d5f5ade075c..217b717e9beb 100644
> --- a/sound/soc/amd/acp/acp70.c
> +++ b/sound/soc/amd/acp/acp70.c
> @@ -182,7 +182,7 @@ static void acp_acp70_audio_remove(struct platform_device *pdev)
>  
>  static int acp70_pcm_resume(struct device *dev)
>  {
> -	struct acp_chip_info *chip = dev_get_platdata(dev);
> +	struct acp_chip_info *chip = dev_get_drvdata(dev->parent);
>  	struct acp_stream *stream;
>  	struct snd_pcm_substream *substream;
>  	snd_pcm_uframes_t buf_in_frames;

Hi Venkata,

Yesterday I ran into what I believe is the issue fixed by this patch on
my very recently acquired Framework 13 with a Ryzen AI 340. While I was
still bisecting this I found a thread[0] of Jacek Luczak having
bisected this and the revert at least solved the suspend issue for me
too, though I was still getting a sound subsystem related crash[2] that
looked related so was waiting for a proper fix. As a side note you
might want to consider adding a Reported-by tag from Jacek.

I had mentioned this on the Framework forums[1] where Mario Limonciello
helpfully pointed me at this series. I just tried your series on top of
v6.15-rc4 and suspend now works. I also haven't seen the other crash I
was still getting with just the revert from the previous thread. And
sound still works too. So feel free to add, or ignore, my:

Tested-by: Niklas Schnelle <niks@kernel.org>

Thanks,
Niklas


[0] https://lore.kernel.org/lkml/CADDYkjR0JG_JTQeQMAvUJvtb9RxFH6_LzV2Fr_1cnqPTgV_Z8w@mail.gmail.com/
[1] https://community.frame.work/t/regression-framework-13-ryzen-340-doesnt-wake-from-suspend-on-v6-15-rc4-works-fine-on-v6-14-4/68514
[2] https://pastebin.com/pR54sve3

      parent reply	other threads:[~2025-05-15  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  6:01 [PATCH 1/3] ASoC: amd: acp: Fix NULL pointer deref on acp resume path Venkata Prasad Potturu
2025-04-25  6:01 ` [PATCH 2/3] ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot Venkata Prasad Potturu
2025-04-25  6:01 ` [PATCH 3/3] ASoC: amd: acp: Fix devm_snd_soc_register_card(acp-pdm-mach) failure Venkata Prasad Potturu
2025-04-25  8:55 ` [PATCH 1/3] ASoC: amd: acp: Fix NULL pointer deref on acp resume path Markus Elfring
2025-04-25  9:05   ` Greg Kroah-Hartman
2025-04-25 11:30   ` Mark Brown
2025-04-25 17:40 ` Mark Brown
2025-05-01 22:16 ` Niklas Schnelle [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=3ba81b7f7859de8ac64e4cf07cc5aa21c3850ae9.camel@kernel.org \
    --to=niks@kernel.org \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=perex@perex.cz \
    --cc=peterz@infradead.org \
    --cc=syed.sabakareem@amd.com \
    --cc=tiwai@suse.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=venkataprasad.potturu@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.