diff options
author | David S. Miller <davem@davemloft.net> | 2014-10-20 12:38:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-20 12:38:19 -0400 |
commit | d10845fc85b2e690b5f6425c5ba4df33a073fbc9 (patch) | |
tree | 14c772873becfbdfc26a1cf0c9d967ffd118f9d8 /net/openvswitch/datapath.c | |
parent | ce8ec4896749783bd6cdc457e6012cfc18e09c8b (diff) | |
parent | f993bc25e5196e60514c216d0bca0f600de64af8 (diff) |
Merge branch 'gso_encap_fixes'
Florian Westphal says:
====================
net: minor gso encapsulation fixes
The following series fixes a minor bug in the gso segmentation handlers
when encapsulation offload is used.
Theoretically this could cause kernel panic when the stack tries
to software-segment such a GRE offload packet, but it looks like there
is only one affected call site (tbf scheduler) and it handles NULL
return value.
I've included a followup patch to add IS_ERR_OR_NULL checks where needed.
While looking into this, I also found that size computation of the individual
segments is incorrect if skb->encapsulation is set.
Please see individual patches for delta vs. v1.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 2e31d9e7f4dc..e6d7255183eb 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -324,6 +324,8 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb, segs = __skb_gso_segment(skb, NETIF_F_SG, false); if (IS_ERR(segs)) return PTR_ERR(segs); + if (segs == NULL) + return -EINVAL; /* Queue all of the segments. */ skb = segs; |