Patrick McHardy wrote:OK the off-by-one prevents an out-of-bounds array access, which would cause a crash itself. Despite what I said above, sfq does try to handle dequeues while empty, but forgets to update q->tail when dropping the last packet from the only active queue, probably because it wasn't expected that the queue length is too small to queue even a single packet (and that really doesn't make much sense). So one possibility for fixing this is to update q->tail in sfq_drop when dropping the last packet, but that would still leave the qdisc non-functional because of the off-by-one. I chose a different way: cap the limit at SFQ_DEPTH-1 and remove the off-by-one, which should have no effect on the max (still 127), but prevents the crash since we can now queue at least a single packet and q->tail is properly updated in sfq_dequeue(). CCed Alexey just to be safe, but I think the patch should be fine. Signed-off-by: Patrick McHardy <kaber@trash.net>
| holzheu | [RFC/PATCH] Documentation of kernel messages |
| jjohansen | [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Joerg Roedel | [PATCH 04/34] AMD IOMMU: add data structures to manage the IOMMUs in the system |
git: | |
| David Kastrup | Empty directories... |
| Tim Ansell | Whats happening with git-notes? |
| Johannes Schindelin | [PATCH 2/2] diff: add custom regular expressions for function names |
| Han-Wen Nienhuys | git branch performance problem? |
| Mayuresh Kathe | Richard Stallman... |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| William Boshuck | Re: Longest Uptime? |
| Sean Hafeez | hostname.pppoe0 with AT&T/SBC debug? |
| Patrick Ohly | [RFC PATCH 00/13] hardware time stamping + igb example implementation |
| Johannes Berg | mac80211 truesize bugs |
| Denys | r8169 crash |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
