lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5.10 038/146] mptcp: do not warn on bad input from the network
    Hi!

    > From: Paolo Abeni <pabeni@redhat.com>
    >
    > [ Upstream commit 61e710227e97172355d5f150d5c78c64175d9fb2 ]
    >
    > warn_bad_map() produces a kernel WARN on bad input coming
    > from the network. Use pr_debug() to avoid spamming the system
    > log.

    So... we switched from WARN _ONCE_ to pr_debug, as many times as we
    detect the problem.

    Should this be pr_debug_once?

    Best regards,
    Pavel


    > +++ b/net/mptcp/subflow.c
    > @@ -655,10 +655,10 @@ static u64 expand_seq(u64 old_seq, u16 old_data_len, u64 seq)
    > return seq | ((old_seq + old_data_len + 1) & GENMASK_ULL(63, 32));
    > }
    >
    > -static void warn_bad_map(struct mptcp_subflow_context *subflow, u32 ssn)
    > +static void dbg_bad_map(struct mptcp_subflow_context *subflow, u32 ssn)
    > {
    > - WARN_ONCE(1, "Bad mapping: ssn=%d map_seq=%d map_data_len=%d",
    > - ssn, subflow->map_subflow_seq, subflow->map_data_len);
    > + pr_debug("Bad mapping: ssn=%d map_seq=%d map_data_len=%d",
    > + ssn, subflow->map_subflow_seq, subflow->map_data_len);
    > }
    >
    > static bool skb_is_fully_mapped(struct sock *ssk, struct sk_buff *skb)

    Best regards,
    Pavel
    --
    http://www.livejournal.com/~pavelmachek
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2021-06-23 16:22    [W:4.085 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site