1. 16 9月, 2014 1 次提交
  2. 10 9月, 2014 1 次提交
  3. 04 9月, 2014 1 次提交
  4. 03 9月, 2014 1 次提交
  5. 23 8月, 2014 2 次提交
    • A
      net/openvswitch/flow.c: Replace rcu_dereference() with rcu_access_pointer() · 8c6b00c8
      Andreea-Cristina Bernat 提交于
      The "rcu_dereference()" call is used directly in a condition.
      Since its return value is never dereferenced it is recommended to use
      "rcu_access_pointer()" instead of "rcu_dereference()".
      Therefore, this patch makes the replacement.
      
      The following Coccinelle semantic patch was used:
      @@
      @@
      
      (
       if(
       (<+...
      - rcu_dereference
      + rcu_access_pointer
        (...)
        ...+>)) {...}
      |
       while(
       (<+...
      - rcu_dereference
      + rcu_access_pointer
        (...)
        ...+>)) {...}
      )
      Signed-off-by: NAndreea-Cristina Bernat <bernat.ada@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c6b00c8
    • J
      openvswitch: fix panic with multiple vlan headers · 2ba5af42
      Jiri Benc 提交于
      When there are multiple vlan headers present in a received frame, the first
      one is put into vlan_tci and protocol is set to ETH_P_8021Q. Anything in the
      skb beyond the VLAN TPID may be still non-linear, including the inner TCI
      and ethertype. While ovs_flow_extract takes care of IP and IPv6 headers, it
      does nothing with ETH_P_8021Q. Later, if OVS_ACTION_ATTR_POP_VLAN is
      executed, __pop_vlan_tci pulls the next vlan header into vlan_tci.
      
      This leads to two things:
      
      1. Part of the resulting ethernet header is in the non-linear part of the
         skb. When eth_type_trans is called later as the result of
         OVS_ACTION_ATTR_OUTPUT, kernel BUGs in __skb_pull. Also, __pop_vlan_tci
         is in fact accessing random data when it reads past the TPID.
      
      2. network_header points into the ethernet header instead of behind it.
         mac_len is set to a wrong value (10), too.
      Reported-by: NYulong Pei <ypei@redhat.com>
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ba5af42
  6. 14 8月, 2014 1 次提交
  7. 08 8月, 2014 1 次提交
  8. 31 7月, 2014 1 次提交
  9. 30 7月, 2014 1 次提交
  10. 25 7月, 2014 3 次提交
    • A
      openvswitch: Add skb_clone NULL check for the sampling action. · d9e0ecb8
      Andy Zhou 提交于
      Fix a bug where skb_clone() NULL check is missing in sample action
      implementation.
      Signed-off-by: NAndy Zhou <azhou@nicira.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      d9e0ecb8
    • S
      openvswitch: Sample action without side effects · 651887b0
      Simon Horman 提交于
      The sample action is rather generic, allowing arbitrary actions to be
      executed based on a probability. However its use, within the Open
      vSwitch
      code-base is limited: only a single user-space action is ever nested.
      
      A consequence of the current implementation of sample actions is that
      depending on weather the sample action executed (due to its probability)
      any side-effects of nested actions may or may not be present before
      executing subsequent actions.  This has the potential to complicate
      verification of valid actions by the (kernel) datapath. And indeed
      adding support for push and pop MPLS actions inside sample actions
      is one case where such case.
      
      In order to allow all supported actions to be continue to be nested
      inside sample actions without the potential need for complex
      verification code this patch changes the implementation of the sample
      action in the kernel datapath so that sample actions are more like
      a function call and any side effects of nested actions are not
      present when executing subsequent actions.
      
      With the above in mind the motivation for this change is twofold:
      
      * To contain side-effects the sample action in the hope of making it
        easier to deal with in the future and;
      * To avoid some rather complex verification code introduced in the MPLS
        datapath patch.
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NJesse Gross <jesse@nicira.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      651887b0
    • A
      openvswitch: Avoid memory corruption in queue_userspace_packet() · f53e3831
      Andy Zhou 提交于
      In queue_userspace_packet(), the ovs_nla_put_flow return value is
      not checked. This is fine as long as key_attr_size() returns the
      correct value. In case it does not, the current code may corrupt buffer
      memory. Add a run time assertion catch this case to avoid silent
      failure.
      Reported-by: NBen Pfaff <blp@nicira.com>
      Signed-off-by: NAndy Zhou <azhou@nicira.com>
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      f53e3831
  11. 24 7月, 2014 2 次提交
  12. 17 7月, 2014 1 次提交
  13. 16 7月, 2014 1 次提交
    • T
      net: set name_assign_type in alloc_netdev() · c835a677
      Tom Gundersen 提交于
      Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
      all users to pass NET_NAME_UNKNOWN.
      
      Coccinelle patch:
      
      @@
      expression sizeof_priv, name, setup, txqs, rxqs, count;
      @@
      
      (
      -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
      +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
      |
      -alloc_netdev_mq(sizeof_priv, name, setup, count)
      +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
      |
      -alloc_netdev(sizeof_priv, name, setup)
      +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
      )
      
      v9: move comments here from the wrong commit
      Signed-off-by: NTom Gundersen <teg@jklm.no>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c835a677
  14. 08 7月, 2014 1 次提交
  15. 02 7月, 2014 1 次提交
  16. 01 7月, 2014 1 次提交
  17. 30 6月, 2014 3 次提交
  18. 05 6月, 2014 1 次提交
  19. 23 5月, 2014 13 次提交
  20. 17 5月, 2014 3 次提交