<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/can/slcan.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-07-15T07:04:27Z</updated>
<entry>
<title>can: slcan: don't touch skb after netif_rx_ni()</title>
<updated>2015-07-15T07:04:27Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2015-07-11T19:16:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2e78cf7a3f562edca4230b188c8832b6214eccd'/>
<id>urn:sha1:a2e78cf7a3f562edca4230b188c8832b6214eccd</id>
<content type='text'>
There is no guarantee that the skb is in the same state after calling
net_receive_skb() or netif_rx(). It might be freed or reused. Not really
harmful as its a read access, except you turn on the proper debugging options
which catch a use after free.

Cc: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
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>can: fix loss of CAN frames in raw_rcv</title>
<updated>2015-06-21T16:58:58Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2015-06-21T16:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8'/>
<id>urn:sha1:36c01245eb8046c16eee6431e7dbfbb302635fa8</id>
<content type='text'>
As reported by Manfred Schlaegl here

   http://marc.info/?l=linux-netdev&amp;m=143482089824232&amp;w=2

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.

As net timestamping is influenced by several players (netstamp_needed and
netdev_tstamp_prequeue) Manfred missed a proper timestamp which leads to
CAN frame loss.

As skb timestamping became now mandatory for CAN related skbs this patch
makes sure that received CAN skbs always have a proper timestamp set.
Maybe there's a better solution in the future but this patch fixes the
CAN frame loss so far.

Reported-by: Manfred Schlaegl &lt;manfred.schlaegl@gmx.at&gt;
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>can: slcan/vcan: eliminate banner[] variable, switch to pr_info()</title>
<updated>2014-12-07T20:22:05Z</updated>
<author>
<name>Jeremiah Mahler</name>
</author>
<published>2014-12-03T08:44:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ace9bb228de3ef5752d6aa8e17c84a8488a26346'/>
<id>urn:sha1:ace9bb228de3ef5752d6aa8e17c84a8488a26346</id>
<content type='text'>
Several can modules in drivers/net/can use a banner[] variable at the
top which defines a string that is used once during init.  This string
is also embedded with KERN_INFO which makes it printk() specific.

Improve the code by eliminating the banner[] variable and moving the
string to where it is printed.  Then switch from printk(KERN_INFO to
pr_info() for the lines that were changed.

This patch is similar to [1] which was applied to net/can.

  [1]: https://lkml.org/lkml/2014/11/22/10

Signed-off-by: Jeremiah Mahler &lt;jmmahler@gmail.com&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>net: set name_assign_type in alloc_netdev()</title>
<updated>2014-07-15T23:12:48Z</updated>
<author>
<name>Tom Gundersen</name>
</author>
<published>2014-07-14T14:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c835a677331495cf137a7f8a023463afd9f032f8'/>
<id>urn:sha1:c835a677331495cf137a7f8a023463afd9f032f8</id>
<content type='text'>
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.

Coccinelle patch:

@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@

(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)

v9: move comments here from the wrong commit

Signed-off-by: Tom Gundersen &lt;teg@jklm.no&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>slcan: Port write_wakeup deadlock fix from slip</title>
<updated>2014-06-17T04:29:13Z</updated>
<author>
<name>Tyler Hall</name>
</author>
<published>2014-06-16T02:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8e83b17536aad603fbeae4c460f2da0ee9fe6ed'/>
<id>urn:sha1:a8e83b17536aad603fbeae4c460f2da0ee9fe6ed</id>
<content type='text'>
The commit "slip: Fix deadlock in write_wakeup" fixes a deadlock caused
by a change made in both slcan and slip. This is a direct port of that
fix.

Signed-off-by: Tyler Hall &lt;tylerwhall@gmail.com&gt;
Cc: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Cc: Andre Naujoks &lt;nautsch2@gmail.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: slcan: Fix spinlock variant</title>
<updated>2014-04-24T20:32:41Z</updated>
<author>
<name>Alexander Stein</name>
</author>
<published>2014-04-15T14:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=367525c8c20a34560afe1d0c7cca52a44ccd62e9'/>
<id>urn:sha1:367525c8c20a34560afe1d0c7cca52a44ccd62e9</id>
<content type='text'>
slc_xmit is called within softirq context and locks sl-&gt;lock, but
slcan_write_wakeup is not softirq context, so we need to use
spin_[un]lock_bh!
Detected using kernel lock debugging mechanism.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&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: Unify MTU settings for CAN interfaces</title>
<updated>2014-03-17T08:20:16Z</updated>
<author>
<name>Oliver Hartkopp</name>
</author>
<published>2014-03-07T08:23:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d'/>
<id>urn:sha1:c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d</id>
<content type='text'>
CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD).
Setting the MTU to other values is pointless but it does not really hurt.
With the introduction of the CAN FD support in drivers/net/can a new
function to switch the MTU for CAN FD has been introduced.

This patch makes use of this can_change_mtu() function to check for correct
MTU settings also in legacy CAN (2.0) devices.

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 FSF address in file headers</title>
<updated>2013-12-17T10:47:21Z</updated>
<author>
<name>Jeff Kirsher</name>
</author>
<published>2013-12-06T14:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05780d9808f72dc28a5c3602e11a7c53aef972ad'/>
<id>urn:sha1:05780d9808f72dc28a5c3602e11a7c53aef972ad</id>
<content type='text'>
Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL &lt;http://www.gnu.org/licenses/&gt; so that we do not have to keep
updating the header comments anytime the address changes.

CC: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
CC: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>slcan: rewrite of slc_bump and slc_encaps</title>
<updated>2013-09-20T19:38:27Z</updated>
<author>
<name>Andre Naujoks</name>
</author>
<published>2013-09-13T17:37:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87397fe10db0e7ee85041eee5a40052cab66aaff'/>
<id>urn:sha1:87397fe10db0e7ee85041eee5a40052cab66aaff</id>
<content type='text'>
The old implementation was heavy on str* functions and sprintf calls.
This version is more manual, but faster.

Profiling just the printing of a 3 char CAN-id resulted in 60 instructions
for the manual method and over 2000 for the sprintf method. Bear in
mind the profiling was done against libc and not the kernel sprintf.

Together with this rewrite an issue with sending and receiving of RTR frames
has been fixed by Oliver for the cases that the DLC is not zero.

Signed-off-by: Andre Naujoks &lt;nautsch2@gmail.com&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
