mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ali Ahmet Memiş" <aliamemis@disroot.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+40b06a86af225236fdb4@syzkaller.appspotmail.com
Subject: Re: [PATCH] ALSA: hda: intel: Don't free card in the probe work
Date: Mon, 12 Oct 2026 17:35:05 +0300	[thread overview]
Message-ID: <20261012143508.1830791-1-aliamemis@disroot.org> (raw)
In-Reply-To: <875wz7idx3.wl-tiwai@suse.de>

On Mon, 12 Oct 2026 09:19:36 +0200, Takashi Iwai wrote:
> For avoiding the card free, can it be the refcounting like below
> instead?

I tried it in QEMU and it hangs on every failed delayed probe even
without a remove.  snd_card_free() waits for the release of card_dev,
but the reference taken in azx_probe_work() is dropped only after
azx_probe_continue() returns, so the work never finishes:

kworker/1:1+events:
[<0>] snd_card_free+0x107/0x160
[<0>] azx_probe_work+0x57d/0x1fa0
[<0>] process_one_work+0x937/0x1800
[<0>] worker_thread+0x4ba/0xd20
[<0>] kthread+0x331/0x420

It also doesn't help azx_remove() which reads the card without a
reference before cancel_delayed_work_sync() and frees it again after
the work.

Which user-visible change did you mean?  The card now stays until the
device is removed instead of being freed in the work.

  reply	other threads:[~2026-10-12 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 20:06 Ali Ahmet Memiş
2026-10-12  7:19 ` Takashi Iwai
2026-10-12 14:35   ` Ali Ahmet Memiş [this message]
2026-10-12 14:57     ` Takashi Iwai
2026-10-12 15:09       ` Ali Ahmet Memiş
2026-10-12 15:56         ` Takashi Iwai

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=20261012143508.1830791-1-aliamemis@disroot.org \
    --to=aliamemis@disroot.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=syzbot+40b06a86af225236fdb4@syzkaller.appspotmail.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®