From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
notify@kernel.org
Subject: Re: [PATCH] ALSA: seq: oss: Reject reads that cannot fit the next event
Date: Tue, 02 Jun 2026 19:54:58 +0200 [thread overview]
Message-ID: <87se74ygi5.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260602-alsa-seq-oss-read-size-check-v1-1-10e59b1742e0@gmail.com>
On Tue, 02 Jun 2026 13:18:39 +0200,
Cássio Gabriel wrote:
>
> snd_seq_oss_read() checks whether the next queued OSS sequencer event
> fits in the remaining userspace buffer before removing it from the read
> queue.
>
> The check is inverted. It currently stops when the event is smaller than
> the remaining buffer, so a normal 4-byte event is not copied for an
> 8-byte read buffer. Conversely, an 8-byte event can be copied for a
> smaller read count.
>
> Break only when the remaining userspace buffer is smaller than the next
> event, and report -EINVAL if no complete event has been copied. This
> prevents an undersized read from looking like end-of-file while leaving
> the event queued for a later read with a large enough buffer.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Applied to for-next branch now. Thanks.
Takashi
prev parent reply other threads:[~2026-06-02 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 11:18 Cássio Gabriel
2026-06-02 17:54 ` 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=87se74ygi5.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cassiogabrielcontato@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=notify@kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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®