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: Mon, 13 Jul 2026 12:13:46 +0200 [thread overview]
Message-ID: <87pl0ryz6t.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260713020427.300628-1-songxiebing@kylinos.cn>
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-13 10:13 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 [this message]
2026-07-14 2:13 ` songxiebing
2026-07-14 5:26 ` Takashi Iwai
-- 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=87pl0ryz6t.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 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.