From: Takashi Iwai <tiwai@suse.de>
To: Cen Zhang <zzzccc427@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, thomas.weissschuh@linutronix.de,
kees@kernel.org, phucduc.bui@gmail.com, sammiee5311@gmail.com,
clemens@ladisch.de, tglx@kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, baijiaju1990@gmail.com,
jjzuming@gmail.com
Subject: Re: [PATCH] ALSA: dummy: Refresh the CD capture switch before use
Date: Fri, 16 Oct 2026 13:48:55 +0200 [thread overview]
Message-ID: <87h5iluaqg.wl-tiwai@suse.de> (raw)
In-Reply-To: <pm-pmb-7364ede2179b8830f660-v2-ca37049bc2e3679bb65f@gmail.com>
On Fri, 16 Oct 2026 04:01:10 +0200,
Cen Zhang wrote:
>
> The CD Capture Switch control must remain live while
> snd_dummy_iobox_put() updates its access flags and uses its ID for
> notification. snd_card_dummy_new_mixer() caches the control pointer, but
> snd_ctl_remove_id() can unlink and free it without updating that cache.
>
> This requires a kernel caller to remove the switch while the dummy card
> stays connected and External I/O Box remains writable. Userspace
> ELEM_REMOVE rejects this driver control because it lacks
> SNDRV_CTL_ELEM_ACCESS_USER.
So, the removal shouldn't happen, but...
> With I/O Box initially 1 and CD Volume still
> present, the following ordered sequence is possible:
>
> 1. snd_ctl_remove_id() takes controls_rwsem for write, finds and
> unlinks CD Capture Switch, sends removal notifications and calls
> snd_ctl_free_one(), then drops the semaphore and returns.
... how this happens at all? Unless 1 really happens, the rest are
fictional dreams.
The same for another dummy driver patch. Does it really happen at
all?
thanks,
Takashi
next prev parent reply other threads:[~2026-10-16 11:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 2:01 [PATCH] ALSA: dummy: Refresh the CD capture switch before use Cen Zhang
2026-10-16 11:48 ` Takashi Iwai [this message]
2026-10-16 12:50 ` Cen Zhang
2026-10-16 13:02 ` Takashi Iwai
2026-10-16 13:25 ` Cen Zhang
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=87h5iluaqg.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=baijiaju1990@gmail.com \
--cc=clemens@ladisch.de \
--cc=jjzuming@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=sammiee5311@gmail.com \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=tiwai@suse.com \
--cc=zzzccc427@gmail.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.