<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/sched, branch v2.6.25</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop</title>
<updated>2008-04-14T22:10:42+00:00</updated>
<author>
<name>Jarek Poplawski</name>
<email>jarkao2@gmail.com</email>
</author>
<published>2008-04-14T22:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=066a3b5b2346febf9a655b444567b7138e3bb939'/>
<id>066a3b5b2346febf9a655b444567b7138e3bb939</id>
<content type='text'>
TC_H_MAJ(parentid) for root classes is the same as for ingress, and if
ingress qdisc is created qdisc_lookup() returns its pointer (without
ingress NULL is returned). After this all qdisc_lookups give the same,
and we get endless loop. (I don't know how this could hide for so long
- it should trigger with every leaf class deleted if it's qdisc isn't
empty.)

After this fix qdisc_lookup() is omitted both for ingress and root
parents, but looking for root is only wasting a little time here...
Many thanks to Enrico Demarin for finding a test for catching this
bug, which probably bothered quite a lot of admins.
 
Reported-by: Enrico Demarin &lt;enrico@superclick.com&gt;,
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TC_H_MAJ(parentid) for root classes is the same as for ingress, and if
ingress qdisc is created qdisc_lookup() returns its pointer (without
ingress NULL is returned). After this all qdisc_lookups give the same,
and we get endless loop. (I don't know how this could hide for so long
- it should trigger with every leaf class deleted if it's qdisc isn't
empty.)

After this fix qdisc_lookup() is omitted both for ingress and root
parents, but looking for root is only wasting a little time here...
Many thanks to Enrico Demarin for finding a test for catching this
bug, which probably bothered quite a lot of admins.
 
Reported-by: Enrico Demarin &lt;enrico@superclick.com&gt;,
Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET_SCHED] cls_u32: refcounting fix for u32_delete()</title>
<updated>2008-04-13T01:37:13+00:00</updated>
<author>
<name>Jarek Poplawski</name>
<email>jarkao2@gmail.com</email>
</author>
<published>2008-04-13T01:37:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e56cfad132f2ae269082359d279c17230c987e74'/>
<id>e56cfad132f2ae269082359d279c17230c987e74</id>
<content type='text'>
Deleting of nonroot hnodes mostly doesn't work in u32_delete():
refcnt == 1 is expected, but such hnodes' refcnts are initialized
with 0 and charged only with "link" nodes. Now they'll start with
1 like usual. Thanks to Patrick McHardy for an improving suggestion.

Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deleting of nonroot hnodes mostly doesn't work in u32_delete():
refcnt == 1 is expected, but such hnodes' refcnts are initialized
with 0 and charged only with "link" nodes. Now they'll start with
1 like usual. Thanks to Patrick McHardy for an improving suggestion.

Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;hadi@cyberus.ca&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET]: Add preemption point in qdisc_run</title>
<updated>2008-03-28T23:25:26+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2008-03-28T23:25:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0'/>
<id>2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0</id>
<content type='text'>
The qdisc_run loop is currently unbounded and runs entirely in a
softirq.  This is bad as it may create an unbounded softirq run.

This patch fixes this by calling need_resched and breaking out if
necessary.

It also adds a break out if the jiffies value changes since that would
indicate we've been transmitting for too long which starves other
softirqs.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The qdisc_run loop is currently unbounded and runs entirely in a
softirq.  This is bad as it may create an unbounded softirq run.

This patch fixes this by calling need_resched and breaking out if
necessary.

It also adds a break out if the jiffies value changes since that would
indicate we've been transmitting for too long which starves other
softirqs.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sch_htb: fix "too many events" situation</title>
<updated>2008-03-24T05:00:38+00:00</updated>
<author>
<name>Martin Devera</name>
<email>devik@cdi.cz</email>
</author>
<published>2008-03-24T05:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8f3ea33a5078a09eba12bfe57424507809367756'/>
<id>8f3ea33a5078a09eba12bfe57424507809367756</id>
<content type='text'>
HTB is event driven algorithm and part of its work is to apply
scheduled events at proper times. It tried to defend itself from
livelock by processing only limited number of events per dequeue.
Because of faster computers some users already hit this hardcoded
limit.

This patch limits processing up to 2 jiffies (why not 1 jiffie ?
because it might stop prematurely when only fraction of jiffie
remains).

Signed-off-by: Martin Devera &lt;devik@cdi.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
HTB is event driven algorithm and part of its work is to apply
scheduled events at proper times. It tried to defend itself from
livelock by processing only limited number of events per dequeue.
Because of faster computers some users already hit this hardcoded
limit.

This patch limits processing up to 2 jiffies (why not 1 jiffie ?
because it might stop prematurely when only fraction of jiffie
remains).

Signed-off-by: Martin Devera &lt;devik@cdi.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PKT_SCHED]: annotate cls_u32</title>
<updated>2008-03-18T05:46:46+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-03-18T05:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0382b9c35469be273ed10fa374496a924055a3c8'/>
<id>0382b9c35469be273ed10fa374496a924055a3c8</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PKT_SCHED] ematch: Fix build warning.</title>
<updated>2008-02-10T11:48:15+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-02-10T11:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=30ddb159ff3c632fdad3c0abc2e7d586a59bc5d1'/>
<id>30ddb159ff3c632fdad3c0abc2e7d586a59bc5d1</id>
<content type='text'>
Commit 954415e33ed6cfa932c13e8c2460bd05e50723b5 ("[PKT_SCHED] ematch:
tcf_em_destroy robustness") removed a cast on em-&gt;data when
passing it to kfree(), but em-&gt;data is an integer type that can
hold pointers as well as other values so the cast is necessary.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 954415e33ed6cfa932c13e8c2460bd05e50723b5 ("[PKT_SCHED] ematch:
tcf_em_destroy robustness") removed a cast on em-&gt;data when
passing it to kfree(), but em-&gt;data is an integer type that can
hold pointers as well as other values so the cast is necessary.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET_SCHED] sch_htb: htb_requeue fix</title>
<updated>2008-02-10T07:44:00+00:00</updated>
<author>
<name>Jarek Poplawski</name>
<email>jarkao2@gmail.com</email>
</author>
<published>2008-02-10T07:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=21347456abfbf5bc7fcace7327476736bbb28abe'/>
<id>21347456abfbf5bc7fcace7327476736bbb28abe</id>
<content type='text'>
htb_requeue() enqueues skbs for which htb_classify() returns NULL.
This is wrong because such skbs could be handled by NET_CLS_ACT code,
and the decision could be different than earlier in htb_enqueue().
So htb_requeue() is changed to work and look more like htb_enqueue().

Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
htb_requeue() enqueues skbs for which htb_classify() returns NULL.
This is wrong because such skbs could be handled by NET_CLS_ACT code,
and the decision could be different than earlier in htb_enqueue().
So htb_requeue() is changed to work and look more like htb_enqueue().

Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PKT_SCHED] ematch: tcf_em_destroy robustness</title>
<updated>2008-02-10T07:26:53+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-02-10T07:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=954415e33ed6cfa932c13e8c2460bd05e50723b5'/>
<id>954415e33ed6cfa932c13e8c2460bd05e50723b5</id>
<content type='text'>
Make the code in tcf_em_tree_destroy more robust and cleaner:
 * Don't need to cast pointer to kfree() or avoid passing NULL.
 * After freeing the tree, clear the pointer to avoid possible problems
from repeated free.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the code in tcf_em_tree_destroy more robust and cleaner:
 * Don't need to cast pointer to kfree() or avoid passing NULL.
 * After freeing the tree, clear the pointer to avoid possible problems
from repeated free.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PKT_SCHED]: deinline functions in meta match</title>
<updated>2008-02-10T07:26:17+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-02-10T07:26:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed7af3b3501c8c4e3667c89c2c43347bf29ae237'/>
<id>ed7af3b3501c8c4e3667c89c2c43347bf29ae237</id>
<content type='text'>
A couple of functions in meta match don't need to be inline.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A couple of functions in meta match don't need to be inline.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PKT_SCHED] ematch: oops from uninitialized variable (resend)</title>
<updated>2008-02-09T11:47:19+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-02-09T11:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=268bcca1e7b0d244afd07ea89cda672e61b0fc4a'/>
<id>268bcca1e7b0d244afd07ea89cda672e61b0fc4a</id>
<content type='text'>
Setting up a meta match causes a kernel OOPS because of uninitialized
elements in tree.

[   37.322381] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[   37.322381] IP: [&lt;ffffffff883fc717&gt;] :em_meta:em_meta_destroy+0x17/0x80

[   37.322381] Call Trace:
[   37.322381]  [&lt;ffffffff803ec83d&gt;] tcf_em_tree_destroy+0x2d/0xa0
[   37.322381]  [&lt;ffffffff803ecc8c&gt;] tcf_em_tree_validate+0x2dc/0x4a0
[   37.322381]  [&lt;ffffffff803f06d2&gt;] nla_parse+0x92/0xe0
[   37.322381]  [&lt;ffffffff883f9672&gt;] :cls_basic:basic_change+0x202/0x3c0
[   37.322381]  [&lt;ffffffff802a3917&gt;] kmem_cache_alloc+0x67/0xa0
[   37.322381]  [&lt;ffffffff803ea221&gt;] tc_ctl_tfilter+0x3b1/0x580
[   37.322381]  [&lt;ffffffff803dffd0&gt;] rtnetlink_rcv_msg+0x0/0x260
[   37.322381]  [&lt;ffffffff803ee944&gt;] netlink_rcv_skb+0x74/0xa0
[   37.322381]  [&lt;ffffffff803dffc8&gt;] rtnetlink_rcv+0x18/0x20
[   37.322381]  [&lt;ffffffff803ee6c3&gt;] netlink_unicast+0x263/0x290
[   37.322381]  [&lt;ffffffff803cf276&gt;] __alloc_skb+0x96/0x160
[   37.322381]  [&lt;ffffffff803ef014&gt;] netlink_sendmsg+0x274/0x340
[   37.322381]  [&lt;ffffffff803c7c3b&gt;] sock_sendmsg+0x12b/0x140
[   37.322381]  [&lt;ffffffff8024de90&gt;] autoremove_wake_function+0x0/0x30
[   37.322381]  [&lt;ffffffff8024de90&gt;] autoremove_wake_function+0x0/0x30
[   37.322381]  [&lt;ffffffff803c7c3b&gt;] sock_sendmsg+0x12b/0x140
[   37.322381]  [&lt;ffffffff80288611&gt;] zone_statistics+0xb1/0xc0
[   37.322381]  [&lt;ffffffff803c7e5e&gt;] sys_sendmsg+0x20e/0x360
[   37.322381]  [&lt;ffffffff803c7411&gt;] sockfd_lookup_light+0x41/0x80
[   37.322381]  [&lt;ffffffff8028d04b&gt;] handle_mm_fault+0x3eb/0x7f0
[   37.322381]  [&lt;ffffffff8020c2fb&gt;] system_call_after_swapgs+0x7b/0x80

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting up a meta match causes a kernel OOPS because of uninitialized
elements in tree.

[   37.322381] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[   37.322381] IP: [&lt;ffffffff883fc717&gt;] :em_meta:em_meta_destroy+0x17/0x80

[   37.322381] Call Trace:
[   37.322381]  [&lt;ffffffff803ec83d&gt;] tcf_em_tree_destroy+0x2d/0xa0
[   37.322381]  [&lt;ffffffff803ecc8c&gt;] tcf_em_tree_validate+0x2dc/0x4a0
[   37.322381]  [&lt;ffffffff803f06d2&gt;] nla_parse+0x92/0xe0
[   37.322381]  [&lt;ffffffff883f9672&gt;] :cls_basic:basic_change+0x202/0x3c0
[   37.322381]  [&lt;ffffffff802a3917&gt;] kmem_cache_alloc+0x67/0xa0
[   37.322381]  [&lt;ffffffff803ea221&gt;] tc_ctl_tfilter+0x3b1/0x580
[   37.322381]  [&lt;ffffffff803dffd0&gt;] rtnetlink_rcv_msg+0x0/0x260
[   37.322381]  [&lt;ffffffff803ee944&gt;] netlink_rcv_skb+0x74/0xa0
[   37.322381]  [&lt;ffffffff803dffc8&gt;] rtnetlink_rcv+0x18/0x20
[   37.322381]  [&lt;ffffffff803ee6c3&gt;] netlink_unicast+0x263/0x290
[   37.322381]  [&lt;ffffffff803cf276&gt;] __alloc_skb+0x96/0x160
[   37.322381]  [&lt;ffffffff803ef014&gt;] netlink_sendmsg+0x274/0x340
[   37.322381]  [&lt;ffffffff803c7c3b&gt;] sock_sendmsg+0x12b/0x140
[   37.322381]  [&lt;ffffffff8024de90&gt;] autoremove_wake_function+0x0/0x30
[   37.322381]  [&lt;ffffffff8024de90&gt;] autoremove_wake_function+0x0/0x30
[   37.322381]  [&lt;ffffffff803c7c3b&gt;] sock_sendmsg+0x12b/0x140
[   37.322381]  [&lt;ffffffff80288611&gt;] zone_statistics+0xb1/0xc0
[   37.322381]  [&lt;ffffffff803c7e5e&gt;] sys_sendmsg+0x20e/0x360
[   37.322381]  [&lt;ffffffff803c7411&gt;] sockfd_lookup_light+0x41/0x80
[   37.322381]  [&lt;ffffffff8028d04b&gt;] handle_mm_fault+0x3eb/0x7f0
[   37.322381]  [&lt;ffffffff8020c2fb&gt;] system_call_after_swapgs+0x7b/0x80

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
