1. 03 11月, 2008 1 次提交
  2. 31 10月, 2008 1 次提交
  3. 20 10月, 2008 1 次提交
    • J
      pkt_sched: sch_generic: Fix oops in sch_teql · 9f3ffae0
      Jarek Poplawski 提交于
      After these commands:
      # modprobe sch_teql
      # tc qdisc add dev eth0 root teql0
      # tc qdisc del dev eth0 root
      we get an oops in teql_destroy() when spin_lock is taken from a null
      qdisc_sleeping pointer. It's because at the moment teql0 dev haven't
      been activated yet, and a qdisc_root_sleeping() is pointing to noop
      qdisc's netdev_queue with qdisc_sleeping uninitialized. This patch
      fixes this both for noop and noqueue netdev_queues to avoid similar
      problems in the future.
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f3ffae0
  4. 09 10月, 2008 1 次提交
  5. 07 10月, 2008 2 次提交
  6. 23 9月, 2008 3 次提交
  7. 17 9月, 2008 1 次提交
  8. 09 9月, 2008 1 次提交
  9. 27 8月, 2008 1 次提交
  10. 22 8月, 2008 1 次提交
  11. 19 8月, 2008 1 次提交
    • D
      pkt_sched: Don't hold qdisc lock over qdisc_destroy(). · 4d8863a2
      David S. Miller 提交于
      Based upon reports by Denys Fedoryshchenko, and feedback
      and help from Jarek Poplawski and Herbert Xu.
      
      We always either:
      
      1) Never made an external reference to this qdisc.
      
      or
      
      2) Did a dev_deactivate() which purged all asynchronous
         references.
      
      So do not lock the qdisc when we call qdisc_destroy(),
      it's illegal anyways as when we drop the lock this is
      free'd memory.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d8863a2
  12. 18 8月, 2008 3 次提交
    • D
      pkt_sched: No longer destroy qdiscs from RCU. · 1e0d5a57
      David S. Miller 提交于
      We can now kill them synchronously with all of the
      previous dev_deactivate() cures.
      
      This makes netdev destruction and shutdown saner as
      the qdiscs hold references to the device.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e0d5a57
    • D
      pkt_sched: Simplify dev_deactivate() polling loop. · 4335cd2d
      David S. Miller 提交于
      The condition under which the previous qdisc has no more references
      after we've attached &noop_qdisc is that both RUNNING and SCHED
      are both seen clear while holding the root lock.
      
      So just make specifically that check in the polling loop, instead
      of this overly complex "check without then check with lock held"
      sequence.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4335cd2d
    • D
      pkt_sched: Add 'deactivated' state. · a9312ae8
      David S. Miller 提交于
      This new state lets dev_deactivate() mark a qdisc as having been
      deactivated.
      
      dev_queue_xmit() and ing_filter() check for this bit and do not
      try to process the qdisc if the bit is set.
      
      dev_deactivate() polls the qdisc after setting the bit, waiting
      for both __QDISC_STATE_RUNNING and __QDISC_STATE_SCHED to clear.
      
      This isn't perfect yet, but subsequent changesets will make it so.
      This part is just one piece of the puzzle.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9312ae8
  13. 14 8月, 2008 1 次提交
    • D
      pkt_sched: Fix queue quiescence testing in dev_deactivate(). · b9a3b110
      David S. Miller 提交于
      Based upon discussions with Jarek P. and Herbert Xu.
      
      First, we're testing the wrong qdisc.  We just reset the device
      queue qdiscs to &noop_qdisc and checking it's state is completely
      pointless here.
      
      We want to wait until the previous qdisc that was sitting at
      the ->qdisc pointer is not busy any more.  And that would be
      ->qdisc_sleeping.
      
      Because of how we propagate the samples qdisc pointer down into
      qdisc_run and friends via per-cpu ->output_queue and netif_schedule,
      we have to wait also for the __QDISC_STATE_SCHED bit to clear as
      well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9a3b110
  14. 03 8月, 2008 1 次提交
  15. 01 8月, 2008 1 次提交
  16. 30 7月, 2008 1 次提交
    • D
      pkt_sched: Fix OOPS on ingress qdisc add. · 8d50b53d
      David S. Miller 提交于
      Bug report from Steven Jan Springl:
      
      	Issuing the following command causes a kernel oops:
      		tc qdisc add dev eth0 handle ffff: ingress
      
      The problem mostly stems from all of the special case handling of
      ingress qdiscs.
      
      So, to fix this, do the grafting operation the same way we do for TX
      qdiscs.  Which means that dev_activate() and dev_deactivate() now do
      the "qdisc_sleeping <--> qdisc" transitions on dev->rx_queue too.
      
      Future simplifications are possible now, mainly because it is
      impossible for dev_queue->{qdisc,qdisc_sleeping} to be NULL.  There
      are NULL checks all over to handle the ingress qdisc special case
      that used to exist before this commit.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d50b53d
  17. 26 7月, 2008 1 次提交
  18. 25 7月, 2008 1 次提交
  19. 22 7月, 2008 3 次提交
  20. 21 7月, 2008 1 次提交
  21. 20 7月, 2008 1 次提交
  22. 19 7月, 2008 2 次提交
    • D
      pkt_sched: Fix noqueue_qdisc initialization. · 30ee42be
      David S. Miller 提交于
      Like noop_qdisc, it needs a dummy backpointer and
      explicit qdisc->q.lock initialization.
      
      Based upon a report by Stephen Hemminger.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30ee42be
    • D
      pkt_sched: Manage qdisc list inside of root qdisc. · 30723673
      David S. Miller 提交于
      Idea is from Patrick McHardy.
      
      Instead of managing the list of qdiscs on the device level, manage it
      in the root qdisc of a netdev_queue.  This solves all kinds of
      visibility issues during qdisc destruction.
      
      The way to iterate over all qdiscs of a netdev_queue is to visit
      the netdev_queue->qdisc, and then traverse it's list.
      
      The only special case is to ignore builting qdiscs at the root when
      dumping or doing a qdisc_lookup().  That was not needed previously
      because builtin qdiscs were not added to the device's qdisc_list.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30723673
  23. 18 7月, 2008 10 次提交