All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pei Xiao <xiaopei01@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, quic_wcheng@quicinc.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: usb-audio: qcom: fix NULL pointer dereference in qmi_stop_session
Date: Wed, 25 Jun 2025 08:29:01 +0200	[thread overview]
Message-ID: <87ldpgjpw2.wl-tiwai@suse.de> (raw)
In-Reply-To: <86ac2939273ac853535049e60391c09d7688714e.1750755508.git.xiaopei01@kylinos.cn>

On Tue, 24 Jun 2025 11:00:47 +0200,
Pei Xiao wrote:
> 
> The find_substream() call may return NULL, but the error path
> dereferenced 'subs' unconditionally via dev_err(&subs->dev->dev, ...),
> causing a NULL pointer dereference when subs is NULL.
> 
> Fix by switching to &uadev[idx].udev->dev which is always valid
> in this context.
> 
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2025-06-25  6:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  9:00 [PATCH v2] ALSA: usb-audio: qcom: fix NULL pointer dereference in qmi_stop_session Pei Xiao
2025-06-25  6:29 ` Takashi Iwai [this message]

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=87ldpgjpw2.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=quic_wcheng@quicinc.com \
    --cc=tiwai@suse.com \
    --cc=xiaopei01@kylinos.cn \
    /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.