From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: tiwai@suse.de, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, perex@perex.cz
Subject: Re: [PATCH v2] ALSA: core: Validate card indices in lookup helpers
Date: Wed, 18 Nov 2026 13:52:53 +0100 [thread overview]
Message-ID: <87y0aqwbbu.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261117153931.2784-1-sreekuttan2156239@gmail.com>
On Tue, 17 Nov 2026 16:39:31 +0100,
Sreeraj S Kurup wrote:
>
> Ensure card indices are within the valid range before accessing
> the card array or lock bitmap in snd_card_ref() and
> snd_card_locked().
>
> This prevents out-of-range indices from causing invalid memory
> accesses in these lookup helpers. It also protects against
> invalid indices passed by existing or future callers.
>
> Warn about invalid card indices and return NULL from
> snd_card_ref() and 0 from snd_card_locked() when an
> invalid card index is supplied.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Applied to for-next branch. Thanks.
Takashi
next prev parent reply other threads:[~2026-11-18 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 10:41 [PATCH] " Sreeraj S Kurup
2026-11-17 15:03 ` Takashi Iwai
2026-11-17 15:38 ` Sreeraj S Kurup
2026-11-17 15:39 ` [PATCH v2] " Sreeraj S Kurup
2026-11-18 12:52 ` Takashi Iwai [this message]
2026-11-18 14:11 ` Sreeraj S Kurup
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=87y0aqwbbu.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=sreekuttan2156239@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 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®