All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Cen Zhang <zzzccc427@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	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 15:02:59 +0200	[thread overview]
Message-ID: <87ecdpu7b0.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAFRLqsUi3te_Dq=o8jDCQyXMO+OmjEKMqa7n8KiRLbifRuHnsQ@mail.gmail.com>

On Fri, 16 Oct 2026 14:50:04 +0200,
Cen Zhang wrote:
> 
> Hi Takashi,
> 
> Takashi Iwai <tiwai@suse.de> 于2026年10月16日周五 19:49写道:
> >
> > 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
> 
> Thanks very much for the review. You're right. It is AI obfuscation.
> After carefully checking the code myself, I could not find a real path
> that removes them.
> 
> I'm very, very sorry for this noise. Please disregard both patches.
> I'll be much more careful in the future.

Don't worry, your patches have been appreciated.

But, I guess that we can ask the model to provide a PoC code for
triggering the bug, at least for the case like dummy driver, and
verify the actual crash?  This would show more clearly whether it's a
real issue or not.


thanks,

Takashi

  reply	other threads:[~2026-10-16 13:03 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
2026-10-16 12:50   ` Cen Zhang
2026-10-16 13:02     ` Takashi Iwai [this message]
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=87ecdpu7b0.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.