[ovs-git] [openvswitch/ovs] 656526: netdev-linux: Cast policer rate to uint64_t to avo...

GitHub noreply at github.com
Fri Aug 29 17:48:45 UTC 2014


  Branch: refs/heads/branch-2.3
  Home:   https://github.com/openvswitch/ovs
  Commit: 6565262571773d6a9ff01761e2358ada0f00be0b
      https://github.com/openvswitch/ovs/commit/6565262571773d6a9ff01761e2358ada0f00be0b
  Author: Thomas Graf <tgraf at noironetworks.com>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M lib/netdev-linux.c

  Log Message:
  -----------
  netdev-linux: Cast policer rate to uint64_t to avoid overflow

tc_fill_rate() takes a 64bit int, casting kbits_rate from int
to uint64_t avoids a possible overflow when translating from
kbits to bytes.

Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


  Commit: b08b678a16be5e054f0c36b3b5b1338827811c65
      https://github.com/openvswitch/ovs/commit/b08b678a16be5e054f0c36b3b5b1338827811c65
  Author: Thomas Graf <tgraf at noironetworks.com>
  Date:   2014-08-29 (Fri, 29 Aug 2014)

  Changed paths:
    M lib/ovs-thread.c

  Log Message:
  -----------
  thread: Use explicit wide type when shifting > 32 bits

Without the explicit wide type, the shift operation may be performed
on a int which will result in implementation defined behaviour on a
system with more than 32 CPUs.

Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/32f34e8f8ee6...b08b678a16be


More information about the git mailing list