[ovs-git] [openvswitch/ovs] d0db81: dpif-netdev: Don't check if xcalloc() failed when ...

GitHub noreply at github.com
Tue Sep 4 20:38:37 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: d0db81eac89e0b0304c6e468c9c4d590414181d8
      https://github.com/openvswitch/ovs/commit/d0db81eac89e0b0304c6e468c9c4d590414181d8
  Author: Justin Pettit <jpettit at ovn.org>
  Date:   2018-09-04 (Tue, 04 Sep 2018)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Don't check if xcalloc() failed when creating meter.

xcalloc() can't return null.

Signed-off-by: Justin Pettit <jpettit at ovn.org>
Acked-by: Flavio Leitner <fbl at sysclose.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: 866bc7567ac5f6cf6ee52f6e3aa1253766898cf6
      https://github.com/openvswitch/ovs/commit/866bc7567ac5f6cf6ee52f6e3aa1253766898cf6
  Author: Justin Pettit <jpettit at ovn.org>
  Date:   2018-09-04 (Tue, 04 Sep 2018)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Prevent unsafe access when retrieving meter stats.

dpif_netdev_meter_get() retrieved a pointer to a meter entry without
holding a lock.  It's possible that another thread could have deleted
that entry between retrieving the pointer and dereferencing the pointer.
This makes the function hold the lock the entire time the meter entry is
needed.

Found by inspection.

Signed-off-by: Justin Pettit <jpettit at ovn.org>
Acked-by: Flavio Leitner <fbl at sysclose.org>


Compare: https://github.com/openvswitch/ovs/compare/e9b33ad780f3...866bc7567ac5
      **NOTE:** This service has 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