<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-10-28T03:27:11Z</updated>
<entry>
<title>net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes</title>
<updated>2015-10-28T03:27:11Z</updated>
<author>
<name>Carol L Soto</name>
<email>clsoto@linux.vnet.ibm.com</email>
</author>
<published>2015-10-27T15:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c02b05011fadf8e409e41910217ca689f2fc9d91'/>
<id>urn:sha1:c02b05011fadf8e409e41910217ca689f2fc9d91</id>
<content type='text'>
When doing memcpy/memset of EQEs, we should use sizeof struct
mlx4_eqe as the base size and not caps.eqe_size which could be bigger.

If caps.eqe_size is bigger than the struct mlx4_eqe then we corrupt
data in the master context.

When using a 64 byte stride, the memcpy copied over 63 bytes to the
slave_eq structure.  This resulted in copying over the entire eqe of
interest, including its ownership bit -- and also 31 bytes of garbage
into the next WQE in the slave EQ -- which did NOT include the ownership
bit (and therefore had no impact).

However, once the stride is increased to 128, we are overwriting the
ownership bits of *three* eqes in the slave_eq struct.  This results
in an incorrect ownership bit for those eqes, which causes the eq to
seem to be full. The issue therefore surfaced only once 128-byte EQEs
started being used in SRIOV and (overarchitectures that have 128/256
byte cache-lines such as PPC) - e.g after commit 77507aa249ae
"net/mlx4_core: Enable CQE/EQE stride support".

Fixes: 08ff32352d6f ('mlx4: 64-byte CQE/EQE support')
Signed-off-by: Carol L Soto &lt;clsoto@linux.vnet.ibm.com&gt;
Signed-off-by: Jack Morgenstein &lt;jackm@dev.mellanox.co.il&gt;
Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/mlx4_en: Explicitly set no vlan tags in WQE ctrl segment when no vlan is present</title>
<updated>2015-10-28T03:27:09Z</updated>
<author>
<name>Jack Morgenstein</name>
<email>jackm@dev.mellanox.co.il</email>
</author>
<published>2015-10-27T15:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=092bf0fc80f5fb7928244ad63d8a2a8df8a72a3e'/>
<id>urn:sha1:092bf0fc80f5fb7928244ad63d8a2a8df8a72a3e</id>
<content type='text'>
We do not set the ins_vlan field to zero when no vlan id is present in the packet.

Since WQEs in the TX ring are not zeroed out between uses, this oversight
could result in having vlan flags present in the WQE ctrl segment when no
vlan is preset.

Fixes: e38af4faf01d ('net/mlx4_en: Add support for hardware accelerated 802.1ad vlan')
Reported-by: Gideon Naim &lt;gideonn@mellanox.com&gt;
Signed-off-by: Jack Morgenstein &lt;jackm@dev.mellanox.co.il&gt;
Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amd-xgbe: Fix race between access of desc and desc index</title>
<updated>2015-10-28T02:49:22Z</updated>
<author>
<name>Lendacky, Thomas</name>
<email>Thomas.Lendacky@amd.com</email>
</author>
<published>2015-10-26T22:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20986ed826cbb36bb8f2d77f872e3c52d8d30647'/>
<id>urn:sha1:20986ed826cbb36bb8f2d77f872e3c52d8d30647</id>
<content type='text'>
During Tx cleanup it's still possible for the descriptor data to be
read ahead of the descriptor index. A memory barrier is required between
the read of the descriptor index and the start of the Tx cleanup loop.
This allows a change to a lighter-weight barrier in the Tx transmit
routine just before updating the current descriptor index.

Since the memory barrier does result in extra overhead on arm64, keep
the previous change to not chase the current descriptor value. This
prevents the execution of the barrier for each loop performed.

Suggested-by: Alexander Duyck &lt;alexander.duyck@gmail.com&gt;
Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>forcedeth: fix unilateral interrupt disabling in netpoll path</title>
<updated>2015-10-28T02:45:23Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2015-10-26T16:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b7c874348ea14ec3c358fe95e56d6f830540248'/>
<id>urn:sha1:0b7c874348ea14ec3c358fe95e56d6f830540248</id>
<content type='text'>
Forcedeth currently uses disable_irq_lockdep and enable_irq_lockdep, which in
some configurations simply calls local_irq_disable.  This causes errant warnings
in the netpoll path as in netpoll_send_skb_on_dev, where we disable irqs using
local_irq_save, leading to the following warning:

WARNING: at net/core/netpoll.c:352 netpoll_send_skb_on_dev+0x243/0x250() (Not
tainted)
Hardware name:
netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll
(nv_start_xmit_optimized+0x0/0x860 [forcedeth])
Modules linked in: netconsole(+) configfs ipv6 iptable_filter ip_tables ppdev
parport_pc parport sg microcode serio_raw edac_core edac_mce_amd k8temp
snd_hda_codec_realtek snd_hda_codec_generic forcedeth snd_hda_intel
snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore
snd_page_alloc i2c_nforce2 i2c_core shpchp ext4 jbd2 mbcache sr_mod cdrom sd_mod
crc_t10dif pata_amd ata_generic pata_acpi sata_nv dm_mirror dm_region_hash
dm_log dm_mod [last unloaded: scsi_wait_scan]
Pid: 1940, comm: modprobe Not tainted 2.6.32-573.7.1.el6.x86_64.debug #1
Call Trace:
 [&lt;ffffffff8107bbc1&gt;] ? warn_slowpath_common+0x91/0xe0
 [&lt;ffffffff8107bcc6&gt;] ? warn_slowpath_fmt+0x46/0x60
 [&lt;ffffffffa00fe5b0&gt;] ? nv_start_xmit_optimized+0x0/0x860 [forcedeth]
 [&lt;ffffffff814b3593&gt;] ? netpoll_send_skb_on_dev+0x243/0x250
 [&lt;ffffffff814b37c9&gt;] ? netpoll_send_udp+0x229/0x270
 [&lt;ffffffffa02e3299&gt;] ? write_msg+0x39/0x110 [netconsole]
 [&lt;ffffffffa02e331b&gt;] ? write_msg+0xbb/0x110 [netconsole]
 [&lt;ffffffff8107bd55&gt;] ? __call_console_drivers+0x75/0x90
 [&lt;ffffffff8107bdba&gt;] ? _call_console_drivers+0x4a/0x80
 [&lt;ffffffff8107c445&gt;] ? release_console_sem+0xe5/0x250
 [&lt;ffffffff8107d200&gt;] ? register_console+0x190/0x3e0
 [&lt;ffffffffa02e71a6&gt;] ? init_netconsole+0x1a6/0x216 [netconsole]
 [&lt;ffffffffa02e7000&gt;] ? init_netconsole+0x0/0x216 [netconsole]
 [&lt;ffffffff810020d0&gt;] ? do_one_initcall+0xc0/0x280
 [&lt;ffffffff810d4933&gt;] ? sys_init_module+0xe3/0x260
 [&lt;ffffffff8100b0d2&gt;] ? system_call_fastpath+0x16/0x1b
---[ end trace f349c7af88e6a6d5 ]---
console [netcon0] enabled
netconsole: network logging started

Fix it by modifying the forcedeth code to use
disable_irq_nosync_lockdep_irqsavedisable_irq_nosync_lockdep_irqsave instead,
which saves and restores irq state properly.  This also saves us a little code
in the process

Tested by the reporter, with successful restuls

Patch applies to the head of the net tree

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Reported-by: Vasily Averin &lt;vvs@sw.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: mv643xx_eth: add missing of_node_put</title>
<updated>2015-10-27T05:08:15Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=26b7974d9ad7f93891ee8c39ee63bd2515da7744'/>
<id>urn:sha1:26b7974d9ad7f93891ee8c39ee63bd2515da7744</id>
<content type='text'>
for_each_available_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
expression root,e;
local idexpression child;
@@

 for_each_available_child_of_node(root, child) {
   ... when != of_node_put(child)
       when != e = child
(
   return child;
|
+  of_node_put(child);
?  return ...;
)
   ...
 }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ath6kl: add missing of_node_put</title>
<updated>2015-10-27T05:08:12Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81a577034b000964ca791281a975f0ba9a9d7eed'/>
<id>urn:sha1:81a577034b000964ca791281a975f0ba9a9d7eed</id>
<content type='text'>
for_each_compatible_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
expression e;
local idexpression n;
@@

 for_each_compatible_node(n,...) {
   ... when != of_node_put(n)
       when != e = n
(
   return n;
|
+  of_node_put(n);
?  return ...;
)
   ...
 }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: mdio: add missing of_node_put</title>
<updated>2015-10-27T05:08:12Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=028623418766ea64f4256035b06ac6cbc0a67892'/>
<id>urn:sha1:028623418766ea64f4256035b06ac6cbc0a67892</id>
<content type='text'>
for_each_available_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
expression root,e;
local idexpression child;
@@

 for_each_available_child_of_node(root, child) {
   ... when != of_node_put(child)
       when != e = child
(
   return child;
|
+  of_node_put(child);
?  return ...;
)
   ...
 }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdev/phy: add missing of_node_put</title>
<updated>2015-10-27T05:08:11Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=447ed7360037b6e38c0206ddcbd04a256ec94099'/>
<id>urn:sha1:447ed7360037b6e38c0206ddcbd04a256ec94099</id>
<content type='text'>
for_each_available_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
local idexpression r.n;
expression r,e;
@@

 for_each_available_child_of_node(r,n) {
   ...
(
   of_node_put(n);
|
   e = n
|
+  of_node_put(n);
?  break;
)
   ...
 }
... when != n
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: netcp: add missing of_node_put</title>
<updated>2015-10-27T05:08:10Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd252796852193277a07da505601a2f407c70e0b'/>
<id>urn:sha1:bd252796852193277a07da505601a2f407c70e0b</id>
<content type='text'>
for_each_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
local idexpression r.n;
expression r,e;
@@

 for_each_child_of_node(r,n) {
   ...
(
   of_node_put(n);
|
   e = n
|
+  of_node_put(n);
?  break;
)
   ...
 }
... when != n
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: thunderx: add missing of_node_put</title>
<updated>2015-10-27T05:08:07Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2015-10-25T13:57:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c387ebbaff8652943a1cbcab496aecadc6a8875'/>
<id>urn:sha1:8c387ebbaff8652943a1cbcab496aecadc6a8875</id>
<content type='text'>
for_each_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// &lt;smpl&gt;
@@
local idexpression r.n;
expression r,e;
@@

 for_each_child_of_node(r,n) {
   ...
(
   of_node_put(n);
|
   e = n
|
+  of_node_put(n);
?  break;
)
   ...
 }
... when != n
// &lt;/smpl&gt;

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