<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/can/af_can.c, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-27T08:39:11Z</updated>
<entry>
<title>can: af_can: can_pernet_init(): add missing error handling for kzalloc returning NULL</title>
<updated>2017-10-27T08:39:11Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2017-07-29T09:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f0a7b0262eea5796bc6b9c4c639bf44f395d7ee'/>
<id>urn:sha1:8f0a7b0262eea5796bc6b9c4c639bf44f395d7ee</id>
<content type='text'>
commit 5a606223c6b5b7560da253ed52e62c67fa18e29b upstream.

This patch adds the missing check and error handling for out-of-memory
situations, when kzalloc cannot allocate memory.

Fixes: cb5635a36776 ("can: complete initial namespace support")
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: af_can: namespace support: fix lockdep splat: properly initialize spin_lock</title>
<updated>2017-06-09T09:39:23Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2017-06-06T11:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74b7b490886852582d986a33443c2ffa50970169'/>
<id>urn:sha1:74b7b490886852582d986a33443c2ffa50970169</id>
<content type='text'>
This patch uses spin_lock_init() instead of __SPIN_LOCK_UNLOCKED() to
initialize the per namespace net-&gt;can.can_rcvlists_lock lock to fix this
lockdep warning:

| INFO: trying to register non-static key.
| the code is fine but needs lockdep annotation.
| turning off the locking correctness validator.
| CPU: 0 PID: 186 Comm: candump Not tainted 4.12.0-rc3+ #47
| Hardware name: Marvell Kirkwood (Flattened Device Tree)
| [&lt;c0016644&gt;] (unwind_backtrace) from [&lt;c00139a8&gt;] (show_stack+0x18/0x1c)
| [&lt;c00139a8&gt;] (show_stack) from [&lt;c0058c8c&gt;] (register_lock_class+0x1e4/0x55c)
| [&lt;c0058c8c&gt;] (register_lock_class) from [&lt;c005bdfc&gt;] (__lock_acquire+0x148/0x1990)
| [&lt;c005bdfc&gt;] (__lock_acquire) from [&lt;c005deec&gt;] (lock_acquire+0x174/0x210)
| [&lt;c005deec&gt;] (lock_acquire) from [&lt;c04a6780&gt;] (_raw_spin_lock+0x50/0x88)
| [&lt;c04a6780&gt;] (_raw_spin_lock) from [&lt;bf02116c&gt;] (can_rx_register+0x94/0x15c [can])
| [&lt;bf02116c&gt;] (can_rx_register [can]) from [&lt;bf02a868&gt;] (raw_enable_filters+0x60/0xc0 [can_raw])
| [&lt;bf02a868&gt;] (raw_enable_filters [can_raw]) from [&lt;bf02ac14&gt;] (raw_enable_allfilters+0x2c/0xa0 [can_raw])
| [&lt;bf02ac14&gt;] (raw_enable_allfilters [can_raw]) from [&lt;bf02ad38&gt;] (raw_bind+0xb0/0x250 [can_raw])
| [&lt;bf02ad38&gt;] (raw_bind [can_raw]) from [&lt;c03b5fb8&gt;] (SyS_bind+0x70/0xac)
| [&lt;c03b5fb8&gt;] (SyS_bind) from [&lt;c000f8c0&gt;] (ret_fast_syscall+0x0/0x1c)

Cc: Mario Kicherer &lt;dev@kicherer.org&gt;
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: complete initial namespace support</title>
<updated>2017-04-25T07:04:29Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2017-04-25T06:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb5635a3677679666e4e81ecbb209d32f13dedcd'/>
<id>urn:sha1:cb5635a3677679666e4e81ecbb209d32f13dedcd</id>
<content type='text'>
The statistics and its proc output was not implemented as per-net in the
initial network namespace support by Mario Kicherer (8e8cda6d737d).
This patch adds the missing per-net statistics for the CAN subsystem.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: remove obsolete pernet_operations definitions</title>
<updated>2017-04-25T07:04:28Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2017-04-25T06:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48452c169d5ddfdbff4af556016dd9e1f47d762b'/>
<id>urn:sha1:48452c169d5ddfdbff4af556016dd9e1f47d762b</id>
<content type='text'>
The namespace support for the CAN subsystem does not need any additional
memory. So when ".size = 0" there's no extra memory allocated by the system.
And therefore ".id" is obsolete too.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: fix memory leak in initial namespace support</title>
<updated>2017-04-25T07:04:27Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2017-04-25T06:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7bbd28f04ce4df26f07e96c4a743d529da99348'/>
<id>urn:sha1:a7bbd28f04ce4df26f07e96c4a743d529da99348</id>
<content type='text'>
The can_rx_alldev_list is a per-net data structure now and allocated in
can_pernet_init(). Make sure the memory is free'd in can_pernet_exit() too.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: initial support for network namespaces</title>
<updated>2017-04-04T15:35:58Z</updated>
<author>
<name>Mario Kicherer</name>
</author>
<published>2017-02-21T11:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e8cda6d737d356054c9eeef642aec0e8ae7e6bc'/>
<id>urn:sha1:8e8cda6d737d356054c9eeef642aec0e8ae7e6bc</id>
<content type='text'>
This patch adds initial support for network namespaces. The changes only
enable support in the CAN raw, proc and af_can code. GW and BCM still
have their checks that ensure that they are used only from the main
namespace.

The patch boils down to moving the global structures, i.e. the global
filter list and their /proc stats, into a per-namespace structure and passing
around the corresponding "struct net" in a lot of different places.

Changes since v1:
 - rebased on current HEAD (2bfe01e)
 - fixed overlong line

Signed-off-by: Mario Kicherer &lt;dev@kicherer.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: Fix kernel panic at security_sock_rcv_skb</title>
<updated>2017-01-29T23:30:56Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2017-01-27T16:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1712c73714088a7252d276a57126d56c7d37e64'/>
<id>urn:sha1:f1712c73714088a7252d276a57126d56c7d37e64</id>
<content type='text'>
Zhang Yanmin reported crashes [1] and provided a patch adding a
synchronize_rcu() call in can_rx_unregister()

The main problem seems that the sockets themselves are not RCU
protected.

If CAN uses RCU for delivery, then sockets should be freed only after
one RCU grace period.

Recent kernels could use sock_set_flag(sk, SOCK_RCU_FREE), but let's
ease stable backports with the following fix instead.

[1]
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [&lt;ffffffff81495e25&gt;] selinux_socket_sock_rcv_skb+0x65/0x2a0

Call Trace:
 &lt;IRQ&gt;
 [&lt;ffffffff81485d8c&gt;] security_sock_rcv_skb+0x4c/0x60
 [&lt;ffffffff81d55771&gt;] sk_filter+0x41/0x210
 [&lt;ffffffff81d12913&gt;] sock_queue_rcv_skb+0x53/0x3a0
 [&lt;ffffffff81f0a2b3&gt;] raw_rcv+0x2a3/0x3c0
 [&lt;ffffffff81f06eab&gt;] can_rcv_filter+0x12b/0x370
 [&lt;ffffffff81f07af9&gt;] can_receive+0xd9/0x120
 [&lt;ffffffff81f07beb&gt;] can_rcv+0xab/0x100
 [&lt;ffffffff81d362ac&gt;] __netif_receive_skb_core+0xd8c/0x11f0
 [&lt;ffffffff81d36734&gt;] __netif_receive_skb+0x24/0xb0
 [&lt;ffffffff81d37f67&gt;] process_backlog+0x127/0x280
 [&lt;ffffffff81d36f7b&gt;] net_rx_action+0x33b/0x4f0
 [&lt;ffffffff810c88d4&gt;] __do_softirq+0x184/0x440
 [&lt;ffffffff81f9e86c&gt;] do_softirq_own_stack+0x1c/0x30
 &lt;EOI&gt;
 [&lt;ffffffff810c76fb&gt;] do_softirq.part.18+0x3b/0x40
 [&lt;ffffffff810c8bed&gt;] do_softirq+0x1d/0x20
 [&lt;ffffffff81d30085&gt;] netif_rx_ni+0xe5/0x110
 [&lt;ffffffff8199cc87&gt;] slcan_receive_buf+0x507/0x520
 [&lt;ffffffff8167ef7c&gt;] flush_to_ldisc+0x21c/0x230
 [&lt;ffffffff810e3baf&gt;] process_one_work+0x24f/0x670
 [&lt;ffffffff810e44ed&gt;] worker_thread+0x9d/0x6f0
 [&lt;ffffffff810e4450&gt;] ? rescuer_thread+0x480/0x480
 [&lt;ffffffff810ebafc&gt;] kthread+0x12c/0x150
 [&lt;ffffffff81f9ccef&gt;] ret_from_fork+0x3f/0x70

Reported-by: Zhang Yanmin &lt;yanmin.zhang@intel.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: only call can_stat_update with procfs</title>
<updated>2016-06-23T09:23:49Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2016-06-20T15:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2781ff5c8fc7722e97503f96686bf6d7093069a9'/>
<id>urn:sha1:2781ff5c8fc7722e97503f96686bf6d7093069a9</id>
<content type='text'>
The change to leave out procfs support in CAN when CONFIG_PROC_FS
is not set was incomplete and leads to a build error:

net/built-in.o: In function `can_init':
:(.init.text+0x9858): undefined reference to `can_stat_update'
ERROR: "can_stat_update" [net/can/can.ko] undefined!

This tries a better approach, encapsulating all of the calls
within IS_ENABLED(), so we also leave out the timer function
from the object file.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: a20fadf85312 ("can: build proc support only if CONFIG_PROC_FS is activated")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: replace timestamp as unique skb attribute</title>
<updated>2015-07-12T19:13:22Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2015-06-26T09:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3b58c47d330de8c29898fe9746f7530408f8a59'/>
<id>urn:sha1:d3b58c47d330de8c29898fe9746f7530408f8a59</id>
<content type='text'>
Commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for
overlapping CAN filters" requires the skb-&gt;tstamp to be set to check for
identical CAN skbs.

Without timestamping to be required by user space applications this timestamp
was not generated which lead to commit 36c01245eb8 "can: fix loss of CAN frames
in raw_rcv" - which forces the timestamp to be set in all CAN related skbuffs
by introducing several __net_timestamp() calls.

This forces e.g. out of tree drivers which are not using alloc_can{,fd}_skb()
to add __net_timestamp() after skbuff creation to prevent the frame loss fixed
in mainline Linux.

This patch removes the timestamp dependency and uses an atomic counter to
create an unique identifier together with the skbuff pointer.

Btw: the new skbcnt element introduced in struct can_skb_priv has to be
initialized with zero in out-of-tree drivers which are not using
alloc_can{,fd}_skb() too.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-06-24T09:58:51Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2015-06-24T09:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a07bd6fead4f00f67b1bf5f551e686661c4f52c'/>
<id>urn:sha1:3a07bd6fead4f00f67b1bf5f551e686661c4f52c</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/mellanox/mlx4/main.c
	net/packet/af_packet.c

Both conflicts were cases of simple overlapping changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
