1. 10 8月, 2010 2 次提交
  2. 08 8月, 2010 1 次提交
  3. 05 8月, 2010 4 次提交
  4. 03 8月, 2010 1 次提交
  5. 01 8月, 2010 2 次提交
  6. 25 7月, 2010 1 次提交
  7. 20 7月, 2010 1 次提交
  8. 19 7月, 2010 1 次提交
  9. 15 7月, 2010 1 次提交
    • 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
  10. 13 7月, 2010 1 次提交
  11. 01 7月, 2010 2 次提交
  12. 29 6月, 2010 1 次提交
  13. 17 6月, 2010 1 次提交
    • T
      Clear IFF_XMIT_DST_RELEASE for teql interfaces · fa68a782
      Tom Hughes 提交于
      https://bugzilla.kernel.org/show_bug.cgi?id=16183
      
      The sch_teql module, which can be used to load balance over a set of
      underlying interfaces, stopped working after 2.6.30 and has been
      broken in all kernels since then for any underlying interface which
      requires the addition of link level headers.
      
      The problem is that the transmit routine relies on being able to
      access the destination address in the skb in order to do address
      resolution once it has decided which underlying interface it is going
      to transmit through.
      
      In 2.6.31 the IFF_XMIT_DST_RELEASE flag was introduced, and set by
      default for all interfaces, which causes the destination address to be
      released before the transmit routine for the interface is called.
      
      The solution is to clear that flag for teql interfaces.
      Signed-off-by: NTom Hughes <tom@compton.nu>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa68a782
  14. 12 6月, 2010 1 次提交
    • E
      pkt_sched: gen_kill_estimator() rcu fixes · c7de2cf0
      Eric Dumazet 提交于
      gen_kill_estimator() API is incomplete or not well documented, since
      caller should make sure an RCU grace period is respected before
      freeing stats_lock.
      
      This was partially addressed in commit 5d944c64
      (gen_estimator: deadlock fix), but same problem exist for all
      gen_kill_estimator() users, if lock they use is not already RCU
      protected.
      
      A code review shows xt_RATEEST.c, act_api.c, act_police.c have this
      problem. Other are ok because they use qdisc lock, already RCU
      protected.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7de2cf0
  15. 07 6月, 2010 2 次提交
  16. 03 6月, 2010 1 次提交
  17. 02 6月, 2010 4 次提交
  18. 31 5月, 2010 1 次提交
    • I
      arp_notify: allow drivers to explicitly request a notification event. · 06c4648d
      Ian Campbell 提交于
      Currently such notifications are only generated when the device comes up or the
      address changes. However one use case for these notifications is to enable
      faster network recovery after a virtual machine migration (by causing switches
      to relearn their MAC tables). A migration appears to the network stack as a
      temporary loss of carrier and therefore does not trigger either of the current
      conditions. Rather than adding carrier up as a trigger (which can cause issues
      when interfaces a flapping) simply add an interface which the driver can use
      to explicitly trigger the notification.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Cc: stable@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06c4648d
  19. 24 5月, 2010 2 次提交
    • H
      cls_cgroup: Store classid in struct sock · f8451725
      Herbert Xu 提交于
      Up until now cls_cgroup has relied on fetching the classid out of
      the current executing thread.  This runs into trouble when a packet
      processing is delayed in which case it may execute out of another
      thread's context.
      
      Furthermore, even when a packet is not delayed we may fail to
      classify it if soft IRQs have been disabled, because this scenario
      is indistinguishable from one where a packet unrelated to the
      current thread is processed by a real soft IRQ.
      
      In fact, the current semantics is inherently broken, as a single
      skb may be constructed out of the writes of two different tasks.
      A different manifestation of this problem is when the TCP stack
      transmits in response of an incoming ACK.  This is currently
      unclassified.
      
      As we already have a concept of packet ownership for accounting
      purposes in the skb->sk pointer, this is a natural place to store
      the classid in a persistent manner.
      
      This patch adds the cls_cgroup classid in struct sock, filling up
      an existing hole on 64-bit :)
      
      The value is set at socket creation time.  So all sockets created
      via socket(2) automatically gains the ID of the thread creating it.
      Whenever another process touches the socket by either reading or
      writing to it, we will change the socket classid to that of the
      process if it has a valid (non-zero) classid.
      
      For sockets created on inbound connections through accept(2), we
      inherit the classid of the original listening socket through
      sk_clone, possibly preceding the actual accept(2) call.
      
      In order to minimise risks, I have not made this the authoritative
      classid.  For now it is only used as a backup when we execute
      with soft IRQs disabled.  Once we're completely happy with its
      semantics we can use it as the sole classid.
      
      Footnote: I have rearranged the error path on cls_group module
      creation.  If we didn't do this, then there is a window where
      someone could create a tc rule using cls_group before the cgroup
      subsystem has been registered.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8451725
    • E
      net_sched: Fix qdisc_notify() · 53b0f080
      Eric Dumazet 提交于
      Ben Pfaff reported a kernel oops and provided a test program to
      reproduce it.
      
      https://kerneltrap.org/mailarchive/linux-netdev/2010/5/21/6277805
      
      tc_fill_qdisc() should not be called for builtin qdisc, or it
      dereference a NULL pointer to get device ifindex.
      
      Fix is to always use tc_qdisc_dump_ignore() before calling
      tc_fill_qdisc().
      Reported-by: NBen Pfaff <blp@nicira.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53b0f080
  20. 18 5月, 2010 6 次提交
  21. 12 5月, 2010 1 次提交
  22. 03 5月, 2010 1 次提交
    • C
      net: fix softnet_stat · dee42870
      Changli Gao 提交于
      Per cpu variable softnet_data.total was shared between IRQ and SoftIRQ context
      without any protection. And enqueue_to_backlog should update the netdev_rx_stat
      of the target CPU.
      
      This patch renames softnet_data.total to softnet_data.processed: the number of
      packets processed in uppper levels(IP stacks).
      
      softnet_stat data is moved into softnet_data.
      Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
      ----
       include/linux/netdevice.h |   17 +++++++----------
       net/core/dev.c            |   26 ++++++++++++--------------
       net/sched/sch_generic.c   |    2 +-
       3 files changed, 20 insertions(+), 25 deletions(-)
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dee42870
  23. 21 4月, 2010 1 次提交
  24. 02 4月, 2010 1 次提交
    • E
      gen_estimator: deadlock fix · 5d944c64
      Eric Dumazet 提交于
      One of my test machine got a deadlock during "tc" sessions,
      adding/deleting classes & filters, using traffic estimators.
      
      After some analysis, I believe we have a potential use after free case
      in est_timer() :
      
      spin_lock(e->stats_lock); << HERE >>
      read_lock(&est_lock);
      if (e->bstats == NULL)   << TEST >>
      	goto skip;
      
      Test is done a bit late, because after estimator is killed, and before
      rcu grace period elapsed, we might already have freed/reuse memory where
      e->stats_locks points to (some qdisc->q.lock)
      
      A possible fix is to respect a rcu grace period at Qdisc dismantle time.
      
      On 64bit, sizeof(struct Qdisc) is exactly 192 bytes. Adding 16 bytes to
      it (for struct rcu_head) is a problem because it might change
      performance, given QDISC_ALIGNTO is 32 bytes.
      
      This is why I also change QDISC_ALIGNTO to 64 bytes, to satisfy most
      current alignment requirements.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d944c64