1. 22 7月, 2010 18 次提交
  2. 21 7月, 2010 3 次提交
  3. 20 7月, 2010 4 次提交
  4. 19 7月, 2010 7 次提交
  5. 16 7月, 2010 2 次提交
  6. 15 7月, 2010 6 次提交
    • T
      net: fix problem in reading sock TX queue · b0f77d0e
      Tom Herbert 提交于
      Fix problem in reading the tx_queue recorded in a socket.  In
      dev_pick_tx, the TX queue is read by doing a check with
      sk_tx_queue_recorded on the socket, followed by a sk_tx_queue_get.
      The problem is that there is not mutual exclusion across these
      calls in the socket so it it is possible that the queue in the
      sock can be invalidated after sk_tx_queue_recorded is called so
      that sk_tx_queue get returns -1, which sets 65535 in queue_index
      and thus dev_pick_tx returns 65536 which is a bogus queue and
      can cause crash in dev_queue_xmit.
      
      We fix this by only calling sk_tx_queue_get which does the proper
      checks.  The interface is that sk_tx_queue_get returns the TX queue
      if the sock argument is non-NULL and TX queue is recorded, else it
      returns -1.  sk_tx_queue_recorded is no longer used so it can be
      completely removed.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0f77d0e
    • C
      Net: ethernet: pe2.c: fix EXPORT_SYMBOL macro code style issue · 54874868
      Chihau Chau 提交于
      This patch fix a code style issue, if a function is exported, the
      EXPORT_SYMBOL macro for it should follow immediately after the closing
      function brace line.
      Signed-off-by: NChihau Chau <chihau@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54874868
    • D
      net/core: neighbour update Oops · 91a72a70
      Doug Kehn 提交于
      When configuring DMVPN (GRE + openNHRP) and a GRE remote
      address is configured a kernel Oops is observed.  The
      obserseved Oops is caused by a NULL header_ops pointer
      (neigh->dev->header_ops) in neigh_update_hhs() when
      
      void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
      = neigh->dev->header_ops->cache_update;
      
      is executed.  The dev associated with the NULL header_ops is
      the GRE interface.  This patch guards against the
      possibility that header_ops is NULL.
      
      This Oops was first observed in kernel version 2.6.26.8.
      Signed-off-by: NDoug Kehn <rdkehn@yahoo.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91a72a70
    • D
      net/sched: potential data corruption · 0eff683f
      Dan Carpenter 提交于
      The reset_policy() does:
              memset(d->tcfd_defdata, 0, SIMP_MAX_DATA);
              strlcpy(d->tcfd_defdata, defdata, SIMP_MAX_DATA);
      
      In the original code, the size of d->tcfd_defdata wasn't fixed and if
      strlen(defdata) was less than 31, reset_policy() would cause memory
      corruption.
      
      Please Note:  The original alloc_defdata() assumes defdata is 32
      characters and a NUL terminator while reset_policy() assumes defdata is
      31 characters and a NUL.  This patch updates alloc_defdata() to match
      reset_policy() (ie a shorter string).  I'm not very familiar with this
      code so please review carefully.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NJamal Hadi Salim <hadi@cyberus.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0eff683f
    • E
      net: skb_tx_hash() fix relative to skb_orphan_try() · 87fd308c
      Eric Dumazet 提交于
      commit fc6055a5 (net: Introduce skb_orphan_try()) added early
      orphaning of skbs.
      
      This unfortunately added a performance regression in skb_tx_hash() in
      case of stacked devices (bonding, vlans, ...)
      
      Since skb->sk is now NULL, we cannot access sk->sk_hash anymore to
      spread tx packets to multiple NIC queues on multiqueue devices.
      
      skb_tx_hash() in this case only uses skb->protocol, same value for all
      flows.
      
      skb_orphan_try() can copy sk->sk_hash into skb->rxhash and skb_tx_hash()
      can use this saved sk_hash value to compute its internal hash value.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87fd308c
    • C
      rfs: call sock_rps_record_flow() in tcp_splice_read() · 3a047bf8
      Changli Gao 提交于
      rfs: call sock_rps_record_flow() in tcp_splice_read()
      
      call sock_rps_record_flow() in tcp_splice_read(), so the applications using
      splice(2) or sendfile(2) can utilize RFS.
      Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
      ----
       net/ipv4/tcp.c |    1 +
       1 file changed, 1 insertion(+)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a047bf8