[lkml]   [2021]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net,stable] net: cdc_ncm: correct overhead in delayed_ndp_size
Jouni Seppänen <> 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 <>

 \ /
  Last update: 2021-01-03 22:18    [W:0.538 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site