Merge tag ‘mac80211-for-davem-2019-04-26’ of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 [Linux 5.1]

Merge tag ‘mac80211-for-davem-2019-04-26’ of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 [Linux 5.1]

This Linux kernel change "Merge tag ‘mac80211-for-davem-2019-04-26’ of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211" is included in the Linux 5.1 release. This change is authored by David S. Miller <davem [at] davemloft.net> on Mon Apr 29 11:00:58 2019 -0400. The commit for this change in Linux stable tree is 2ae7a39 (patch). Other info about this change: Merge: 21f1b8a 5178791

Merge tag 'mac80211-for-davem-2019-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
 * fix use-after-free in mac80211 TXQs
 * fix RX STBC byte order
 * fix debugfs rename crashing due to ERR_PTR()
 * fix missing regulatory notification
====================

Signed-off-by: David S. Miller <[email protected]>

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/ipv4/udp_offload.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 64f9715..d8776b2 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -377,13 +377,14 @@ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,

        /* Terminate the flow on len mismatch or if it grow "too much".
         * Under small packet flood GRO count could elsewhere grow a lot
-        * leading to execessive truesize values
+        * leading to execessive truesize values.
+        * On len mismatch merge the first packet shorter than gso_size,
+        * otherwise complete the GRO packet.
         */
-       if (!skb_gro_receive(p, skb) &&
+       if (uh->len > uh2->len || skb_gro_receive(p, skb) ||
+           uh->len != uh2->len ||
            NAPI_GRO_CB(p)->count >= UDP_GRO_CNT_MAX)
            pp = p;
-       else if (uh->len != uh2->len)
-           pp = p;

        return pp;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *