<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/can, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>can: Fix raw_getname() leak</title>
<updated>2009-08-10T04:45:32+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-08-06T20:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e84b90ae5eb3c112d1f208964df1d8156a538289'/>
<id>e84b90ae5eb3c112d1f208964df1d8156a538289</id>
<content type='text'>
raw_getname() can leak 10 bytes of kernel memory to user

(two bytes hole between can_family and can_ifindex,
8 bytes at the end of sockaddr_can structure)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
raw_getname() can leak 10 bytes of kernel memory to user

(two bytes hole between can_family and can_ifindex,
8 bytes at the end of sockaddr_can structure)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/can: add module alias to can protocol drivers</title>
<updated>2009-07-15T18:20:38+00:00</updated>
<author>
<name>Lothar Waßmann</name>
<email>LW@KARO-electronics.de</email>
</author>
<published>2009-07-14T23:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b13bb2e9933b9dfa25c81d959d847c843481111e'/>
<id>b13bb2e9933b9dfa25c81d959d847c843481111e</id>
<content type='text'>
Add appropriate MODULE_ALIAS() to facilitate autoloading of can protocol drivers

Signed-off-by: Lothar Wassmann &lt;LW@KARO-electronics.de&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
Add appropriate MODULE_ALIAS() to facilitate autoloading of can protocol drivers

Signed-off-by: Lothar Wassmann &lt;LW@KARO-electronics.de&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/can bugfix: use after free bug in can protocol drivers</title>
<updated>2009-07-15T18:20:37+00:00</updated>
<author>
<name>Lothar Waßmann</name>
<email>LW@KARO-electronics.de</email>
</author>
<published>2009-07-14T23:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f7e5cc0c40dff92bad2894153f675c6c542ba2f0'/>
<id>f7e5cc0c40dff92bad2894153f675c6c542ba2f0</id>
<content type='text'>
Fix a use after free bug in can protocol drivers

The release functions of the can protocol drivers lack a call to
sock_orphan() which leads to referencing freed memory under certain
circumstances.

This patch fixes a bug reported here:
https://lists.berlios.de/pipermail/socketcan-users/2009-July/000985.html

Signed-off-by: Lothar Wassmann &lt;LW@KARO-electronics.de&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
Fix a use after free bug in can protocol drivers

The release functions of the can protocol drivers lack a call to
sock_orphan() which leads to referencing freed memory under certain
circumstances.

This patch fixes a bug reported here:
https://lists.berlios.de/pipermail/socketcan-users/2009-July/000985.html

Signed-off-by: Lothar Wassmann &lt;LW@KARO-electronics.de&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: af_can.c use rcu_barrier() on module unload.</title>
<updated>2009-06-10T08:11:24+00:00</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>hawk@comx.dk</email>
</author>
<published>2009-06-08T03:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=382bfeec48e43c416af9b271b9b70d2f61ef32d2'/>
<id>382bfeec48e43c416af9b271b9b70d2f61ef32d2</id>
<content type='text'>
This module uses rcu_call() thus it should use rcu_barrier()
on module unload.

Signed-off-by: Jesper Dangaard Brouer &lt;hawk@comx.dk&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
This module uses rcu_call() thus it should use rcu_barrier()
on module unload.

Signed-off-by: Jesper Dangaard Brouer &lt;hawk@comx.dk&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: Network Drop Monitor: Make use of consume_skb() in af_can.c</title>
<updated>2009-04-17T08:38:46+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>oliver@hartkopp.net</email>
</author>
<published>2009-04-17T08:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=62bcaa13039538c7f794b0cfcbc26e0313e7fcd5'/>
<id>62bcaa13039538c7f794b0cfcbc26e0313e7fcd5</id>
<content type='text'>
Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop
Monitor: Adding kfree_skb_clean for non-drops and modifying
end-of-line points for skbs") so called end-of-line points for skb's
should use consume_skb() to free the socket buffer.

In opposite to consume_skb() the function kfree_skb() is intended to
be used for unexpected skb drops e.g. in error conditions that now can
trigger the network drop monitor if enabled.

This patch moves the skb end-of-line point in af_can.c to use
consume_skb().

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop
Monitor: Adding kfree_skb_clean for non-drops and modifying
end-of-line points for skbs") so called end-of-line points for skb's
should use consume_skb() to free the socket buffer.

In opposite to consume_skb() the function kfree_skb() is intended to
be used for unexpected skb drops e.g. in error conditions that now can
trigger the network drop monitor if enabled.

This patch moves the skb end-of-line point in af_can.c to use
consume_skb().

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>proc 2/2: remove struct proc_dir_entry::owner</title>
<updated>2009-03-30T21:14:44+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-03-25T19:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=99b76233803beab302123d243eea9e41149804f3'/>
<id>99b76233803beab302123d243eea9e41149804f3</id>
<content type='text'>
Setting -&gt;owner as done currently (pde-&gt;owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
-&gt;owner, thus not pinning enything, and release it later resulting
in module refcount underflow.

We can keep -&gt;owner and supply it at registration time like -&gt;proc_fops
and -&gt;data.

But this leaves -&gt;owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching -&gt;owner. -&gt;proc_fops is declared as "const" which should give
some thoughts.

-&gt;read_proc/-&gt;write_proc were just fixed to not require -&gt;owner for
protection.

rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.

Removing -&gt;owner will also make PDE smaller.

So, let's nuke it.

Kudos to Jeff Layton for reminding about this, let's say, oversight.

http://bugzilla.kernel.org/show_bug.cgi?id=12454

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting -&gt;owner as done currently (pde-&gt;owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
-&gt;owner, thus not pinning enything, and release it later resulting
in module refcount underflow.

We can keep -&gt;owner and supply it at registration time like -&gt;proc_fops
and -&gt;data.

But this leaves -&gt;owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching -&gt;owner. -&gt;proc_fops is declared as "const" which should give
some thoughts.

-&gt;read_proc/-&gt;write_proc were just fixed to not require -&gt;owner for
protection.

rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.

Removing -&gt;owner will also make PDE smaller.

So, let's nuke it.

Kudos to Jeff Layton for reminding about this, let's say, oversight.

http://bugzilla.kernel.org/show_bug.cgi?id=12454

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: remove some pointless conditionals before kfree_skb()</title>
<updated>2009-02-27T07:07:35+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2009-02-25T00:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ce030edfb4ba6734248b8d9f98d0a6f1dcd142e7'/>
<id>ce030edfb4ba6734248b8d9f98d0a6f1dcd142e7</id>
<content type='text'>
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.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>
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ip: support for TX timestamps on UDP and RAW sockets</title>
<updated>2009-02-16T06:43:38+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2009-02-12T05:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=51f31cabe3ce5345b51e4a4f82138b38c4d5dc91'/>
<id>51f31cabe3ce5345b51e4a4f82138b38c4d5dc91</id>
<content type='text'>
Instructions for time stamping outgoing packets are take from the
socket layer and later copied into the new skb.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.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>
Instructions for time stamping outgoing packets are take from the
socket layer and later copied into the new skb.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: replace uses of __constant_{endian}</title>
<updated>2009-02-01T08:45:17+00:00</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2009-02-01T08:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=09640e6365c679b5642b1c41b6d7078f51689ddf'/>
<id>09640e6365c679b5642b1c41b6d7078f51689ddf</id>
<content type='text'>
Base versions handle constant folding now.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@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>
Base versions handle constant folding now.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: fix slowpath issue in hrtimer callback function</title>
<updated>2009-01-15T05:06:55+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>oliver@hartkopp.net</email>
</author>
<published>2009-01-15T05:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c53a6ee88b0a91bd012ef1b7988c0b93dae6f24d'/>
<id>c53a6ee88b0a91bd012ef1b7988c0b93dae6f24d</id>
<content type='text'>
Due to the loopback functionality in can_send() we can not invoke it
from hardirq context which was done inside the
bcm_tx_timeout_handler() hrtimer callback:

[  700.361154]  [&lt;c012228c&gt;] warn_slowpath+0x80/0xb6
[  700.361163]  [&lt;c013d559&gt;] valid_state+0x125/0x136
[  700.361171]  [&lt;c013d858&gt;] mark_lock+0x18e/0x332
[  700.361180]  [&lt;c013e300&gt;] __lock_acquire+0x12e/0xb1e
[  700.361189]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361198]  [&lt;c031e20a&gt;] dev_queue_xmit+0x191/0x479
[  700.361206]  [&lt;c01262a7&gt;] __local_bh_disable+0x2b/0x64
[  700.361213]  [&lt;c031e20a&gt;] dev_queue_xmit+0x191/0x479
[  700.361225]  [&lt;f8aa69a1&gt;] can_send+0xd7/0x11a [can]
[  700.361235]  [&lt;f8ab522b&gt;] bcm_can_tx+0x9d/0xd9 [can_bcm]
[  700.361245]  [&lt;f8ab597f&gt;] bcm_tx_timeout_handler+0x6a/0xbc [can_bcm]
[  700.361255]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361263]  [&lt;c0134143&gt;] __run_hrtimer+0x5a/0x86
[  700.361273]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361282]  [&lt;c0134a50&gt;] hrtimer_interrupt+0xb9/0x110

This patch moves the rest of the functionality from the hrtimer
callback to the already existing tasklet to fix this slowpath problem.

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.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>
Due to the loopback functionality in can_send() we can not invoke it
from hardirq context which was done inside the
bcm_tx_timeout_handler() hrtimer callback:

[  700.361154]  [&lt;c012228c&gt;] warn_slowpath+0x80/0xb6
[  700.361163]  [&lt;c013d559&gt;] valid_state+0x125/0x136
[  700.361171]  [&lt;c013d858&gt;] mark_lock+0x18e/0x332
[  700.361180]  [&lt;c013e300&gt;] __lock_acquire+0x12e/0xb1e
[  700.361189]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361198]  [&lt;c031e20a&gt;] dev_queue_xmit+0x191/0x479
[  700.361206]  [&lt;c01262a7&gt;] __local_bh_disable+0x2b/0x64
[  700.361213]  [&lt;c031e20a&gt;] dev_queue_xmit+0x191/0x479
[  700.361225]  [&lt;f8aa69a1&gt;] can_send+0xd7/0x11a [can]
[  700.361235]  [&lt;f8ab522b&gt;] bcm_can_tx+0x9d/0xd9 [can_bcm]
[  700.361245]  [&lt;f8ab597f&gt;] bcm_tx_timeout_handler+0x6a/0xbc [can_bcm]
[  700.361255]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361263]  [&lt;c0134143&gt;] __run_hrtimer+0x5a/0x86
[  700.361273]  [&lt;f8ab5915&gt;] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361282]  [&lt;c0134a50&gt;] hrtimer_interrupt+0xb9/0x110

This patch moves the rest of the functionality from the hrtimer
callback to the already existing tasklet to fix this slowpath problem.

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
