1. 03 12月, 2006 8 次提交
  2. 08 11月, 2006 1 次提交
  3. 01 11月, 2006 1 次提交
  4. 23 10月, 2006 1 次提交
  5. 12 10月, 2006 1 次提交
  6. 04 10月, 2006 2 次提交
  7. 29 9月, 2006 3 次提交
    • P
      [NET_SCHED]: Fix fallout from dev->qdisc RCU change · 85670cc1
      Patrick McHardy 提交于
      The move of qdisc destruction to a rcu callback broke locking in the
      entire qdisc layer by invalidating previously valid assumptions about
      the context in which changes to the qdisc tree occur.
      
      The two assumptions were:
      
      - since changes only happen in process context, read_lock doesn't need
        bottem half protection. Now invalid since destruction of inner qdiscs,
        classifiers, actions and estimators happens in the RCU callback unless
        they're manually deleted, resulting in dead-locks when read_lock in
        process context is interrupted by write_lock_bh in bottem half context.
      
      - since changes only happen under the RTNL, no additional locking is
        necessary for data not used during packet processing (f.e. u32_list).
        Again, since destruction now happens in the RCU callback, this assumption
        is not valid anymore, causing races while using this data, which can
        result in corruption or use-after-free.
      
      Instead of "fixing" this by disabling bottem halfs everywhere and adding
      new locks/refcounting, this patch makes these assumptions valid again by
      moving destruction back to process context. Since only the dev->qdisc
      pointer is protected by RCU, but ->enqueue and the qdisc tree are still
      protected by dev->qdisc_lock, destruction of the tree can be performed
      immediately and only the final free needs to happen in the rcu callback
      to make sure dev_queue_xmit doesn't access already freed memory.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85670cc1
    • P
      [NET_SCHED]: HTB: fix incorrect use of RB_EMPTY_NODE · 787e0617
      Patrick McHardy 提交于
      Fix incorrect use of RB_EMPTY_NODE in htb_safe_rb_erase, which makes it
      skip nodes within the rbtree instead of nodes not in the tree, resulting
      in crashes later on.
      
      The root cause for this seems to be the very counter-intuitive behaviour
      of the RB_EMPTY_NODE macro, which returns _false_ when the node is empty.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      787e0617
    • K
      [PKT_SCHED] cls_basic: Use unsigned int when generating handle · 658270a0
      Kim Nordlund 提交于
      Prevents filters from being added if the first generated
      handle already exists.
      Signed-off-by: NKim Nordlund <kim.nordlund@nokia.com>
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      658270a0
  8. 23 9月, 2006 13 次提交
  9. 18 9月, 2006 1 次提交
    • H
      [NET]: Drop tx lock in dev_watchdog_up · d7811e62
      Herbert Xu 提交于
      Fix lockdep warning with GRE, iptables and Speedtouch ADSL, PPP over ATM.
      
      On Sat, Sep 02, 2006 at 08:39:28PM +0000, Krzysztof Halasa wrote:
      > 
      > =======================================================
      > [ INFO: possible circular locking dependency detected ]
      > -------------------------------------------------------
      > swapper/0 is trying to acquire lock:
      >  (&dev->queue_lock){-+..}, at: [<c02c8c46>] dev_queue_xmit+0x56/0x290
      > 
      > but task is already holding lock:
      >  (&dev->_xmit_lock){-+..}, at: [<c02c8e14>] dev_queue_xmit+0x224/0x290
      > 
      > which lock already depends on the new lock.
      
      This turns out to be a genuine bug.  The queue lock and xmit lock are
      intentionally taken out of order.  Two things are supposed to prevent
      dead-locks from occuring:
      
      1) When we hold the queue_lock we're supposed to only do try_lock on the
      tx_lock.
      
      2) We always drop the queue_lock after taking the tx_lock and before doing
      anything else.
      
      > 
      > the existing dependency chain (in reverse order) is:
      > 
      > -> #1 (&dev->_xmit_lock){-+..}:
      >        [<c012e7b6>] lock_acquire+0x76/0xa0
      >        [<c0336241>] _spin_lock_bh+0x31/0x40
      >        [<c02d25a9>] dev_activate+0x69/0x120
      
      This path obviously breaks assumption 1) and therefore can lead to ABBA
      dead-locks.
      
      I've looked at the history and there seems to be no reason for the lock
      to be held at all in dev_watchdog_up.  The lock appeared in day one and
      even there it was unnecessary.  In fact, people added __dev_watchdog_up
      precisely in order to get around the tx lock there.
      
      The function dev_watchdog_up is already serialised by rtnl_lock since
      its only caller dev_activate is always called under it.
      
      So here is a simple patch to remove the tx lock from dev_watchdog_up.
      In 2.6.19 we can eliminate the unnecessary __dev_watchdog_up and
      replace it with dev_watchdog_up.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7811e62
  10. 18 8月, 2006 1 次提交
  11. 05 8月, 2006 1 次提交
  12. 22 7月, 2006 2 次提交
  13. 16 7月, 2006 1 次提交
  14. 15 7月, 2006 1 次提交
  15. 13 7月, 2006 1 次提交
  16. 10 7月, 2006 1 次提交
  17. 06 7月, 2006 1 次提交