1. 06 11月, 2014 2 次提交
  2. 29 10月, 2014 3 次提交
  3. 21 10月, 2014 1 次提交
    • F
      net: make skb_gso_segment error handling more robust · 330966e5
      Florian Westphal 提交于
      skb_gso_segment has three possible return values:
      1. a pointer to the first segmented skb
      2. an errno value (IS_ERR())
      3. NULL.  This can happen when GSO is used for header verification.
      
      However, several callers currently test IS_ERR instead of IS_ERR_OR_NULL
      and would oops when NULL is returned.
      
      Note that these call sites should never actually see such a NULL return
      value; all callers mask out the GSO bits in the feature argument.
      
      However, there have been issues with some protocol handlers erronously not
      respecting the specified feature mask in some cases.
      
      It is preferable to get 'have to turn off hw offloading, else slow' reports
      rather than 'kernel crashes'.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      330966e5
  4. 18 10月, 2014 3 次提交
  5. 16 10月, 2014 2 次提交
  6. 07 10月, 2014 1 次提交
    • A
      openvswitch: fix a sparse warning · 0a5d1c55
      Andy Zhou 提交于
      Fix a sparse warning introduced by commit:
      f5796684 (openvswitch: Add support for
      Geneve tunneling.) caught by kbuild test robot:
      
      reproduce:
        # apt-get install sparse
        #   git checkout f5796684
        #     make ARCH=x86_64 allmodconfig
        #       make C=1 CF=-D__CHECK_ENDIAN__
        #
        #
        #       sparse warnings: (new ones prefixed by >>)
        #
        #       >> net/openvswitch/vport-geneve.c:109:15: sparse: incorrect type in assignment (different base types)
        #          net/openvswitch/vport-geneve.c:109:15:    expected restricted __be16 [usertype] sport
        #             net/openvswitch/vport-geneve.c:109:15:    got int
        #             >> net/openvswitch/vport-geneve.c:110:56: sparse: incorrect type in argument 3 (different base types)
        #                net/openvswitch/vport-geneve.c:110:56:    expected unsigned short [unsigned] [usertype] value
        #                   net/openvswitch/vport-geneve.c:110:56:    got restricted __be16 [usertype] sport
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NAndy Zhou <azhou@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a5d1c55
  7. 06 10月, 2014 5 次提交
  8. 27 9月, 2014 1 次提交
  9. 20 9月, 2014 1 次提交
  10. 16 9月, 2014 5 次提交
  11. 10 9月, 2014 1 次提交
  12. 04 9月, 2014 1 次提交
  13. 03 9月, 2014 1 次提交
  14. 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
  15. 14 8月, 2014 1 次提交
  16. 08 8月, 2014 1 次提交
  17. 31 7月, 2014 1 次提交
  18. 30 7月, 2014 1 次提交
  19. 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
  20. 24 7月, 2014 2 次提交
  21. 17 7月, 2014 1 次提交
  22. 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