diff options
author | Neal Shrader via dev <ovs-dev@openvswitch.org> | 2018-06-22 18:18:50 -0400 |
---|---|---|
committer | Pravin B Shelar <pshelar@ovn.org> | 2018-06-25 20:07:16 -0700 |
commit | f17d533ed9e188ca1498369f12f3d66747110d19 (patch) | |
tree | f841889cf16ddc2b8b29ac8d8915eb2207603ba2 /datapath | |
parent | 3ccb8899892b6afe3d323594a900b6818ec5dd48 (diff) | |
download | openvswitch-f17d533ed9e188ca1498369f12f3d66747110d19.tar.gz |
datapath: stt: linearize in SKIP_ZERO_COPY case
During the investigation of a kernel panic, we encountered a condition
that triggered a kernel panic due to a large skb with an unusual
geometry. Inside of the STT codepath, an effort is made to linearize
such packets to avoid trouble during both fragment reassembly and
segmentation in the linux networking core.
As currently implemented, kernels with CONFIG_SLUB defined will skip
this process because it does not expect an skb with a frag_list to be
present. This patch removes the assumption, and allows these skb to
be linearized as intended. We confirmed this corrects the panic we
encountered.
Reported-by: Johannes Erdfelt <johannes@erdfelt.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-May/046800.html
Requested-by: Pravin Shelar <pshelar@ovn.org>
Signed-off-by: Neal Shrader <neal@digitalocean.com>
Signed-off-by: Pravin Shelar <pshelar@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/stt.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index 2426223db..fc7e74f6d 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -562,12 +562,6 @@ static int __try_to_segment(struct sk_buff *skb, bool csum_partial, static int try_to_segment(struct sk_buff *skb) { -#ifdef SKIP_ZERO_COPY - /* coalesce_skb() since does not generate frag-list no need to - * linearize it here. - */ - return 0; -#else struct stthdr *stth = stt_hdr(skb); bool csum_partial = !!(stth->flags & STT_CSUM_PARTIAL); bool ipv4 = !!(stth->flags & STT_PROTO_IPV4); @@ -575,7 +569,6 @@ static int try_to_segment(struct sk_buff *skb) int l4_offset = stth->l4_offset; return __try_to_segment(skb, csum_partial, ipv4, tcp, l4_offset); -#endif } static int segment_skb(struct sk_buff **headp, bool csum_partial, |