All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: "Jouni Seppänen" <jks@iki.fi>
Cc: Oliver Neukum <oliver@neukum.org>,
	linux-usb@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Enrico Mioso <mrkiko.rs@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net,stable] net: cdc_ncm: correct overhead in delayed_ndp_size
Date: Sun, 03 Jan 2021 22:04:43 +0100	[thread overview]
Message-ID: <87ft3henpw.fsf@miraculix.mork.no> (raw)
In-Reply-To: <20210103143602.95343-1-jks@iki.fi> ("Jouni =?utf-8?Q?Sepp?= =?utf-8?Q?=C3=A4nen=22's?= message of "Sun, 3 Jan 2021 16:36:02 +0200")

Jouni Seppänen <jks@iki.fi> writes:

> +		delayed_ndp_size = ctx->max_ndp_size +
> +			max(ctx->tx_ndp_modulus,
> +			    ctx->tx_modulus + ctx->tx_remainder) - 1;

You'll probably have to use something like

  max_t(u32, ctx->tx_ndp_modulus, ctx->tx_modulus + ctx->tx_remainder)
  
here as the test robot already said.  Sorry for not seeing that earlier.
Otherwise this looks very good to me. The bug is real and severe, and
your patch appears to be the proper fix for it.

Thanks a lot for figuring this out and taking the time to fixup this
rather messy piece of code.

Reviewed-by: Bjørn Mork <bjorn@mork.no>


      parent reply	other threads:[~2021-01-03 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 14:36 [PATCH net,stable] net: cdc_ncm: correct overhead in delayed_ndp_size Jouni Seppänen
2021-01-03 17:03 ` kernel test robot
2021-01-03 17:03   ` [PATCH net, stable] " kernel test robot
2021-01-03 20:23 ` [PATCH net,stable v2] " Jouni Seppänen
2021-01-04 22:00   ` Jakub Kicinski
2021-01-05  4:52   ` [PATCH net,stable v3] " Jouni Seppänen
2021-01-06  0:52     ` David Miller
2021-01-03 21:04 ` Bjørn Mork [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=87ft3henpw.fsf@miraculix.mork.no \
    --to=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=jks@iki.fi \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mrkiko.rs@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    /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.