All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Sunho Park <shpark061104@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] USB: serial: io_edgeport: cap received transmit credits
Date: Wed, 22 Jul 2026 11:26:38 +0200	[thread overview]
Message-ID: <amCMzp6QAXDDczVU@hovoldconsulting.com> (raw)
In-Reply-To: <20260714104230.893968-1-shpark061104@gmail.com>

On Tue, Jul 14, 2026 at 07:42:30PM +0900, Sunho Park wrote:
> The interrupt-status packet reports transmit credits returned by the
> device. edge_interrupt_callback() adds the 16-bit value to txCredits
> without checking maxTxCredits.
> 
> edge_write() uses txCredits minus the software FIFO count as the amount
> of data that fits. Since the FIFO is allocated with maxTxCredits bytes,
> txCredits exceeding maxTxCredits can cause OOB write in ring buffer.
> 
> Cap accumulated credits at maxTxCredits. Conforming devices should never
> hit the cap.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:GPT-5
> Signed-off-by: Sunho Park <shpark061104@gmail.com>
> ---
> V2 -> V3: Added missing revision history (no code changes)
> V1 -> V2: Replaced min_t() with min() 
> 
> v2: https://lore.kernel.org/linux-usb/20260714101316.823942-1-shpark061104@gmail.com/
> v1: https://lore.kernel.org/linux-usb/20260714093424.737303-1-shpark061104@gmail.com/

Applied, thanks.

Johan

      parent reply	other threads:[~2026-07-22  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 10:42 [PATCH v3] USB: serial: io_edgeport: cap received transmit credits Sunho Park
2026-07-14 12:19 ` Greg Kroah-Hartman
2026-07-14 13:11   ` Sunho Park
2026-07-22  9:26 ` Johan Hovold [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=amCMzp6QAXDDczVU@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=shpark061104@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.