[ovs-git] [openvswitch/ovs] e3b5d7: netdev-linux: Fix segfault in update_lag().

GitHub noreply at github.com
Thu Jul 5 21:13:02 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: e3b5d7c536078ba2c2218f8b3def2e31e8c86a38
      https://github.com/openvswitch/ovs/commit/e3b5d7c536078ba2c2218f8b3def2e31e8c86a38
  Author: Tiago Lam <tiago.lam at intel.com>
  Date:   2018-07-05 (Thu, 05 Jul 2018)

  Changed paths:
    M lib/netdev-linux.c

  Log Message:
  -----------
  netdev-linux: Fix segfault in update_lag().

A bissect shows that commit d22f892 ("netdev-linux: monitor and offload
LAG slaves to TC") introduced netdev_linux_update_lag(), which is now
triggering a crash in the "datapath - ping over bond" test in
system-userspace-testsuite:

  (gdb) bt
  #0  0x00000000009762e7 in netdev_linux_update_lag (change=0x7ffdff013750) at lib/netdev-linux.c:728
  728                 if (is_netdev_linux_class(master_netdev->netdev_class)) {

This fixes the crash by simply returning in case netdev_from_name()
returns NULL, as this should indicate the master is not attached to the
bridge.

Additionally, netdev_linux_update_lag() isn't "clearing" the netdev
reference it gets from netdev_from_name(), meaning its ref_cnt is
incremented but never decremented. Thus, also call netdev_close() before
returning.

CC: John Hurley <john.hurley at netronome.com>
Fixes: d22f8927 ("netdev-linux: monitor and offload LAG slaves to TC")
Signed-off-by: Tiago Lam <tiago.lam at intel.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list