All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: gaggery.tsai@intel.com
Cc: linux-sound@vger.kernel.org, mstrozek@opensource.cirrus.com,
	yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: SDCA: Fix NULL pointer dereference in sdca_jack_process()
Date: Fri, 13 Mar 2026 09:54:28 +0000	[thread overview]
Message-ID: <abPe1EUHUX9ZRZJk@opensource.cirrus.com> (raw)
In-Reply-To: <20260312143218.2008222-1-gaggery.tsai@intel.com>

On Thu, Mar 12, 2026 at 07:32:18AM -0700, gaggery.tsai@intel.com wrote:
> From: TsaiGaggery <gaggery.tsai@intel.com>
> +static void class_function_component_remove(struct snd_soc_component *component)
> +{
> +	struct class_function_drv *drv = snd_soc_component_get_drvdata(component);
> +	struct sdca_class_drv *core = drv->core;
> +
> +	sdca_irq_disable(drv->function, core->irq_info);
> +}

Yeah as Mark notes this is really just postponing the issues till
you rebind the card.

> +	if (!card || !card->snd_card) {
> +		dev_dbg(dev, "card not yet bound, deferring jack event\n");
> +		return -ENODEV;
> +	}
> +
> +	rwsem = &card->snd_card->controls_rwsem;
> +	kctl = state->kctl;
> +

This is really a bit overly defensive, its just a driver bug if
this is called without these.

Let me have a look at this today, I think really the problem is
we shouldn't be devm'ing the IRQs since they are not being
handled at device probe time.

Thanks,
Charles

  parent reply	other threads:[~2026-03-13  9:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 18:38 [PATCH] ASoC: SDCA: Fix NULL pointer dereference in sdca_jack_process() gaggery.tsai
2026-03-11 16:31 ` Mark Brown
2026-03-11 17:45   ` Tsai, Gaggery
2026-03-11 17:50     ` Charles Keepax
2026-03-12 14:32 ` [PATCH v2] " gaggery.tsai
2026-03-12 17:32   ` Mark Brown
2026-03-13  9:54   ` Charles Keepax [this message]
2026-03-13 13:28     ` Mark Brown
2026-03-13 14:28       ` Charles Keepax

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=abPe1EUHUX9ZRZJk@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=gaggery.tsai@intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=mstrozek@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=yung-chuan.liao@linux.intel.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.