[ovs-git] [openvswitch/ovs] ec92f8: netdev-afxdp: Fix umem creation failure due to uni...

Ilya Maximets noreply at github.com
Thu Oct 10 18:21:48 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: ec92f8d2ffc11cdfc9d7f9abfffca64d4ac0293a
      https://github.com/openvswitch/ovs/commit/ec92f8d2ffc11cdfc9d7f9abfffca64d4ac0293a
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M lib/netdev-afxdp.c

  Log Message:
  -----------
  netdev-afxdp: Fix umem creation failure due to uninitialized config.

Later version of 'struct xsk_umem_config' contains additional field
'flags'.  OVS doesn't use that field passing uninitialized stack
memory to the 'xsk_umem__create()' call that could fail with
'Invalid argument' if 'flags' are non-zero or, even worse, create
umem with unexpected properties.

We need to clear the whole structure explicitly to avoid this kind
of issues.

Fixes: 0de1b425962d ("netdev-afxdp: add new netdev type for AF_XDP.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Signed-off-by: William Tu <u9012063 at gmail.com>




More information about the git mailing list