[ovs-git] [openvswitch/ovs] 367a6b: ofp-packet: Fix NXT_RESUME with geneve tunnel meta...

Yi-Hung Wei noreply at github.com
Mon Feb 4 19:39:18 UTC 2019


  Branch: refs/heads/branch-2.9
  Home:   https://github.com/openvswitch/ovs
  Commit: 367a6be4631c3a36044ff8920172bd918f3edc48
      https://github.com/openvswitch/ovs/commit/367a6be4631c3a36044ff8920172bd918f3edc48
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2019-02-04 (Mon, 04 Feb 2019)

  Changed paths:
    M lib/ofp-util.c
    M tests/system-traffic.at

  Log Message:
  -----------
  ofp-packet: Fix NXT_RESUME with geneve tunnel metadata

The patch address vswitchd crash when it receives NXT_RESUME with geneve
tunnel metadata.  The crash is due to segmentation fault with the
following stack trace, and it is observed only in kernel datapath.
A test is added to prevent regression.

Thread 1 "ovs-vswitchd" received signal SIGSEGV, Segmentation fault.
0  0x00007fcffd0c5412 in tun_metadata_to_geneve__ (flow=flow at entry=0x7ffcb7106680, b=b at entry=0x7ffcb70eb5a8, crit_opt=crit_opt at entry=0x7ffcb70eb287)
   at lib/tun-metadata.c:676
1  0x00007fcffd0c6858 in tun_metadata_to_geneve_nlattr_flow (b=0x7ffcb70eb5a8, flow=0x7ffcb7106638) at lib/tun-metadata.c:706
2  tun_metadata_to_geneve_nlattr (tun=tun at entry=0x7ffcb7106638, flow=flow at entry=0x7ffcb7106638, key=key at entry=0x0, b=b at entry=0x7ffcb70eb5a8)
   at lib/tun-metadata.c:810
3  0x00007fcffd048464 in tun_key_to_attr (a=a at entry=0x7ffcb70eb5a8, tun_key=tun_key at entry=0x7ffcb7106638, tun_flow_key=tun_flow_key at entry=0x7ffcb7106638,
   key_buf=key_buf at entry=0x0, tnl_type=<optimized out>, tnl_type at entry=0x0) at lib/odp-util.c:2886
4  0x00007fcffd0551cf in odp_key_from_dp_packet (buf=buf at entry=0x7ffcb70eb5a8, packet=0x7ffcb7106590) at lib/odp-util.c:5909
5  0x00007fcffd0d7870 in dpif_netlink_encode_execute (buf=0x7ffcb70eb5a8, d_exec=0x7ffcb7106428, dp_ifindex=<optimized out>) at lib/dpif-netlink.c:1873
6  dpif_netlink_operate__ (dpif=dpif at entry=0xe65e00, ops=ops at entry=0x7ffcb7106418, n_ops=n_ops at entry=1) at lib/dpif-netlink.c:1959
7  0x00007fcffd0d842e in dpif_netlink_operate_chunks (n_ops=1, ops=0x7ffcb7106418, dpif=<optimized out>) at lib/dpif-netlink.c:2258
8  dpif_netlink_operate (dpif_=0xe65e00, ops=<optimized out>, n_ops=<optimized out>) at lib/dpif-netlink.c:2294
9  0x00007fcffd014680 in dpif_operate (dpif=<optimized out>, ops=<optimized out>, ops at entry=0x7ffcb7106418, n_ops=n_ops at entry=1) at lib/dpif.c:1359
10 0x00007fcffd014c58 in dpif_execute (dpif=<optimized out>, execute=execute at entry=0x7ffcb71064e0) at lib/dpif.c:1324
11 0x00007fcffd40d3e6 in nxt_resume (ofproto_=0xe6af50, pin=0x7ffcb7107150) at ofproto/ofproto-dpif.c:4885
12 0x00007fcffd3f88c3 in handle_nxt_resume (ofconn=ofconn at entry=0xf8c8f0, oh=oh at entry=0xf7ebd0) at ofproto/ofproto.c:3612
13 0x00007fcffd404a3b in handle_openflow__ (msg=0xeac460, ofconn=0xf8c8f0) at ofproto/ofproto.c:8137
14 handle_openflow (ofconn=0xf8c8f0, ofp_msg=0xeac460) at ofproto/ofproto.c:8258
15 0x00007fcffd3f4653 in ofconn_run (handle_openflow=0x7fcffd4046f0 <handle_openflow>, ofconn=0xf8c8f0) at ofproto/connmgr.c:1432
16 connmgr_run (mgr=0xe422f0, handle_openflow=handle_openflow at entry=0x7fcffd4046f0 <handle_openflow>) at ofproto/connmgr.c:363
17 0x00007fcffd3fdc76 in ofproto_run (p=0xe6af50) at ofproto/ofproto.c:1821
18 0x000000000040ca94 in bridge_run__ () at vswitchd/bridge.c:2939
19 0x0000000000411d44 in bridge_run () at vswitchd/bridge.c:2997
20 0x00000000004094fd in main (argc=12, argv=0x7ffcb71085b8) at vswitchd/ovs-vswitchd.c:119

(cherry-picked from commit bed941ba0f14854683c241fa9bff3d49dd2efeee)
Conflicts:
        lib/ofp-packet.c
(branch-2.9 doesn't have lib/ofp-packet.c. The relevant code is in ofp-util.c, so modified it.)

VMWare-BZ: #2210216
CC: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list