All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jason Winter <jjx@live.nl>
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, linux@rainbow-software.org,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH net-next v2] net: usb: cx82310_eth: bound partial-frame remainder by current skb length
Date: Tue, 18 Aug 2026 10:21:50 -0700	[thread overview]
Message-ID: <20260818102150.5b4a1c60@kernel.org> (raw)
In-Reply-To: <BESP194MB2832095AA142E77E4F39E33EB8A72@BESP194MB2832.EURP194.PROD.OUTLOOK.COM>

On Mon, 17 Aug 2026 21:54:34 +0200 Jason Winter wrote:
> @@ -251,6 +251,13 @@ static int cx82310_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>  	 * end of that packet at the beginning.
>  	 */
>  	if (dev->partial_rem) {
> +		if (dev->partial_rem > skb->len) {
> +			netdev_err(dev->net,
> +				   "RX partial frame: need %lu, got %u\n",
> +				   dev->partial_rem, skb->len);
> +			dev->partial_rem = 0;
> +			return 0;

Always ratelimit datapath prints.
You should probably increment rx_errors as well / instead.
-- 
pw-bot: cr

      reply	other threads:[~2026-08-18 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 19:54 [PATCH net-next v2] net: usb: cx82310_eth: bound partial-frame remainder by current skb length Jason Winter
2026-08-18 17:21 ` Jakub Kicinski [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=20260818102150.5b4a1c60@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jjx@live.nl \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.