Messages in this thread | | | From | Eric Dumazet <> | Date | Mon, 9 Nov 2020 14:36:33 +0100 | Subject | Re: [PATCH] net: tcp: ratelimit warnings in tcp_recvmsg |
| |
On Mon, Nov 9, 2020 at 2:07 PM <menglong8.dong@gmail.com> wrote: > > From: Menglong Dong <dong.menglong@zte.com.cn> > > 'before(*seq, TCP_SKB_CB(skb)->seq) == true' means that one or more > skbs are lost somehow. Once this happen, it seems that it will > never recover automatically. As a result, a warning will be printed > and a '-EAGAIN' will be returned in non-block mode. > > As a general suituation, users call 'poll' on a socket and then receive > skbs with 'recv' in non-block mode. This mode will make every > arriving skb of the socket trigger a warning. Plenty of skbs will cause > high rate of kernel log. > > Besides, WARN is for indicating kernel bugs only and should not be > user-triggable. Replace it with 'net_warn_ratelimited' here. > > Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
I do not think this patch is useful. That is simply code churn.
Can you trigger the WARN() in the latest upstream version ? If yes this is a serious bug that needs urgent attention.
Make sure you have backported all needed fixes into your kernel, if you get this warning on a non pristine kernel.
| |