All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sreeraj S Kurup" <sreekuttan2156239@gmail.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: core: Fix info read handling
Date: Mon, 09 Nov 2026 09:07:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-204670@kernel.org> (raw)
In-Reply-To: <20261109085922.3104-1-sreekuttan2156239@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ALSA: core: missing Fixes trailer for commit d97e1b78239c
--

commit a395693d2a5039fea3a9bd10c727bfff30a92e11
Author: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

> ALSA: core: Fix info read handling
>
> snd_info_entry_read() may invoke driver read callbacks with a
> zero-length read when the requested count is zero.
>
> Some callbacks perform zero-sized allocations, such as
> vmalloc(0), which can trigger warnings and cause the read to
> fail with -ENOMEM.
>
> Return immediately when count is zero to avoid invoking driver
> callbacks unnecessarily.
>
> Also, store the callback result in a separate ssize_t variable
> instead of reusing the size_t variable. This makes the signedness
> explicit and avoids the unnecessary cast when checking whether
> to update the file position.
>
> Update the file position only when the callback returns a
> positive number of bytes.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

[Severity: Low]
Driver read callbacks previously checked size > 0 themselves until those
checks were centralized in snd_info_entry_read() and snd_info_entry_write(),
where only snd_info_entry_write() guarded against count == 0.  Should this
include:

  Fixes: d97e1b78239c ("ALSA: info - Check file position validity in common layer")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109085922.3104-1-sreekuttan2156239@gmail.com?part=1

  reply	other threads:[~2026-11-09  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  8:08 [PATCH] ALSA: core: Fix signedness issue in info read callback Sreeraj S Kurup
2026-11-09  8:16 ` sashiko-bot
2026-11-09  8:59 ` [PATCH v2] ALSA: core: Fix info read handling Sreeraj S Kurup
2026-11-09  9:07   ` sashiko-bot [this message]
2026-11-09  9:22 ` [PATCH v3] " 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=sashiko-outbox-204670@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 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.