From: Takashi Iwai <tiwai@suse.de>
To: songxiebing <songxiebing@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda: Check snd_hda_power_pm construct error before executing verb
Date: Tue, 14 Jul 2026 07:26:01 +0200 [thread overview]
Message-ID: <87tsq2jg5y.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260714021351.332483-1-songxiebing@kylinos.cn>
On Tue, 14 Jul 2026 04:13:51 +0200,
songxiebing wrote:
>
> Hi Takashi,
>
> At present, this patch may cause misjudgment for some platform devices.
> If rpm is not enabled on the platform device, the default runtime_status is suspended,
> which will result in the inability to write commands properly.
>
> Could you please drop this patch? Sorry for the trouble.
OK, dropped now.
thanks,
Takashi
> >On Mon, 13 Jul 2026 04:04:27 +0200,
> >songxiebing wrote:
> >>
> >> From: Bob Song <songxiebing@kylinos.cn>
> >>
> >> When userspace writes 1 to /sys/bus/pci/devices/XX/remove to remove HDA PCI device,
> >> the codec device enters runtime suspended state early. The snd_hda_power_pm RAII
> >> constructor fails to wake up codec, but the original code ignores pm.err and continues
> >> to execute hda verb commands. After pci driver remove callback completes, devres
> >> automatically iounmap the BAR virtual address bus->remap_addr, resulting in access
> >> to invalid unmapped MMIO address and triggering page fault BUG.
> >>
> >> Add error check for snd_hda_power_pm constructor result:
> >> 1. Detect pm construction failure when HDA core device is suspended;
> >> 2. Print warning log with command and error code for debug;
> >> 3. Return early to skip subsequent hardware register access, avoid page fault crash.
> >>
> >> Signed-off-by: Bob Song <songxiebing@kylinos.cn>
> >
> >Applied to for-next branch. Thanks.
> >
> >
> >Takashi
next prev parent reply other threads:[~2026-07-14 5:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 2:04 [PATCH] ALSA: hda: Check snd_hda_power_pm construct error before executing verb songxiebing
2026-07-13 10:13 ` Takashi Iwai
2026-07-14 2:13 ` songxiebing
2026-07-14 5:26 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-14 2:07 songxiebing
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=87tsq2jg5y.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=songxiebing@kylinos.cn \
--cc=tiwai@suse.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