<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/vmxnet3, branch v4.7</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>vmxnet3: segCnt can be 1 for LRO packets</title>
<updated>2016-06-10T07:15:11+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-06-08T14:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=50219538ffc0493a2b451a3aa0191138ef8bfe9d'/>
<id>50219538ffc0493a2b451a3aa0191138ef8bfe9d</id>
<content type='text'>
The device emulation may send segCnt of 1 for LRO packets.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Jin Heo &lt;heoj@vmware.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>
The device emulation may send segCnt of 1 for LRO packets.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Jin Heo &lt;heoj@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets</title>
<updated>2016-04-21T19:28:05+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-04-21T01:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0d437809d23999cb25207cfbe80c61e5703fdc1'/>
<id>f0d437809d23999cb25207cfbe80c61e5703fdc1</id>
<content type='text'>
For IPv6, if the device indicates that the checksum is correct, set
CHECKSUM_UNNECESSARY.

Reported-by: Subbarao Narahari &lt;snarahari@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Jin Heo &lt;heoj@vmware.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>
For IPv6, if the device indicates that the checksum is correct, set
CHECKSUM_UNNECESSARY.

Reported-by: Subbarao Narahari &lt;snarahari@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Jin Heo &lt;heoj@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: fix lock imbalance in vmxnet3_tq_xmit()</title>
<updated>2016-03-14T17:10:29+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-03-14T14:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=efc21d95067f658a20e51e24c4c86d68f23b7f7f'/>
<id>efc21d95067f658a20e51e24c4c86d68f23b7f7f</id>
<content type='text'>
A recent bug fix rearranged the code in vmxnet3_tq_xmit() in a
way that left the error handling for oversized headers unlock
a lock that had not been taken yet. Gcc warns about the incorrect
use of the 'flags' variable because of that:

drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_tq_xmit.constprop':
include/linux/spinlock.h:246:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the error handling path to 'goto' the end of the function
beyond the lock/unlock pair.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: cec05562fb1d ("vmxnet3: avoid calling pskb_may_pull with interrupts disabled")
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 recent bug fix rearranged the code in vmxnet3_tq_xmit() in a
way that left the error handling for oversized headers unlock
a lock that had not been taken yet. Gcc warns about the incorrect
use of the 'flags' variable because of that:

drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_tq_xmit.constprop':
include/linux/spinlock.h:246:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the error handling path to 'goto' the end of the function
beyond the lock/unlock pair.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: cec05562fb1d ("vmxnet3: avoid calling pskb_may_pull with interrupts disabled")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: avoid calling pskb_may_pull with interrupts disabled</title>
<updated>2016-03-07T20:15:24+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2016-03-04T18:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cec05562fb1dcdf09ef7b46e1e3eade98e488893'/>
<id>cec05562fb1dcdf09ef7b46e1e3eade98e488893</id>
<content type='text'>
vmxnet3 has a function vmxnet3_parse_and_copy_hdr which, among other operations,
uses pskb_may_pull to linearize the header portion of an skb.  That operation
eventually uses local_bh_disable/enable to ensure that it doesn't race with the
drivers bottom half handler.  Unfortunately, vmxnet3 preforms this
parse_and_copy operation with a spinlock held and interrupts disabled.  This
causes us to run afoul of the WARN_ON_ONCE(irqs_disabled()) warning in
local_bh_enable, resulting in this:

WARNING: at kernel/softirq.c:159 local_bh_enable+0x59/0x90() (Not tainted)
Hardware name: VMware Virtual Platform
Modules linked in: ipv6 ppdev parport_pc parport microcode e1000 vmware_balloon
vmxnet3 i2c_piix4 sg ext4 jbd2 mbcache sd_mod crc_t10dif sr_mod cdrom mptspi
mptscsih mptbase scsi_transport_spi pata_acpi ata_generic ata_piix vmwgfx ttm
drm_kms_helper drm i2c_core dm_mirror dm_region_hash dm_log dm_mod [last
unloaded: mperf]
Pid: 6229, comm: sshd Not tainted 2.6.32-616.el6.i686 #1
Call Trace:
 [&lt;c04624d9&gt;] ? warn_slowpath_common+0x89/0xe0
 [&lt;c0469e99&gt;] ? local_bh_enable+0x59/0x90
 [&lt;c046254b&gt;] ? warn_slowpath_null+0x1b/0x20
 [&lt;c0469e99&gt;] ? local_bh_enable+0x59/0x90
 [&lt;c07bb936&gt;] ? skb_copy_bits+0x126/0x210
 [&lt;f8d1d9fe&gt;] ? ext4_ext_find_extent+0x24e/0x2d0 [ext4]
 [&lt;c07bc49e&gt;] ? __pskb_pull_tail+0x6e/0x2b0
 [&lt;f95a6164&gt;] ? vmxnet3_xmit_frame+0xba4/0xef0 [vmxnet3]
 [&lt;c05d15a6&gt;] ? selinux_ip_postroute+0x56/0x320
 [&lt;c0615988&gt;] ? cfq_add_rq_rb+0x98/0x110
 [&lt;c0852df8&gt;] ? packet_rcv+0x48/0x350
 [&lt;c07c5839&gt;] ? dev_queue_xmit_nit+0xc9/0x140
...

Fix it by splitting vmxnet3_parse_and_copy_hdr into two functions:

vmxnet3_parse_hdr, which sets up the internal/on stack ctx datastructure, and
pulls the skb (both of which can be done without holding the spinlock with irqs
disabled

and

vmxnet3_copy_header, which just copies the skb to the tx ring under the lock
safely.

tested and shown to correct the described problem.  Applies cleanly to the head
of the net tree

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Shrikrishna Khare &lt;skhare@vmware.com&gt;
CC: "VMware, Inc." &lt;pv-drivers@vmware.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Shrikrishna Khare &lt;skhare@vmware.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>
vmxnet3 has a function vmxnet3_parse_and_copy_hdr which, among other operations,
uses pskb_may_pull to linearize the header portion of an skb.  That operation
eventually uses local_bh_disable/enable to ensure that it doesn't race with the
drivers bottom half handler.  Unfortunately, vmxnet3 preforms this
parse_and_copy operation with a spinlock held and interrupts disabled.  This
causes us to run afoul of the WARN_ON_ONCE(irqs_disabled()) warning in
local_bh_enable, resulting in this:

WARNING: at kernel/softirq.c:159 local_bh_enable+0x59/0x90() (Not tainted)
Hardware name: VMware Virtual Platform
Modules linked in: ipv6 ppdev parport_pc parport microcode e1000 vmware_balloon
vmxnet3 i2c_piix4 sg ext4 jbd2 mbcache sd_mod crc_t10dif sr_mod cdrom mptspi
mptscsih mptbase scsi_transport_spi pata_acpi ata_generic ata_piix vmwgfx ttm
drm_kms_helper drm i2c_core dm_mirror dm_region_hash dm_log dm_mod [last
unloaded: mperf]
Pid: 6229, comm: sshd Not tainted 2.6.32-616.el6.i686 #1
Call Trace:
 [&lt;c04624d9&gt;] ? warn_slowpath_common+0x89/0xe0
 [&lt;c0469e99&gt;] ? local_bh_enable+0x59/0x90
 [&lt;c046254b&gt;] ? warn_slowpath_null+0x1b/0x20
 [&lt;c0469e99&gt;] ? local_bh_enable+0x59/0x90
 [&lt;c07bb936&gt;] ? skb_copy_bits+0x126/0x210
 [&lt;f8d1d9fe&gt;] ? ext4_ext_find_extent+0x24e/0x2d0 [ext4]
 [&lt;c07bc49e&gt;] ? __pskb_pull_tail+0x6e/0x2b0
 [&lt;f95a6164&gt;] ? vmxnet3_xmit_frame+0xba4/0xef0 [vmxnet3]
 [&lt;c05d15a6&gt;] ? selinux_ip_postroute+0x56/0x320
 [&lt;c0615988&gt;] ? cfq_add_rq_rb+0x98/0x110
 [&lt;c0852df8&gt;] ? packet_rcv+0x48/0x350
 [&lt;c07c5839&gt;] ? dev_queue_xmit_nit+0xc9/0x140
...

Fix it by splitting vmxnet3_parse_and_copy_hdr into two functions:

vmxnet3_parse_hdr, which sets up the internal/on stack ctx datastructure, and
pulls the skb (both of which can be done without holding the spinlock with irqs
disabled

and

vmxnet3_copy_header, which just copies the skb to the tx ring under the lock
safely.

tested and shown to correct the described problem.  Applies cleanly to the head
of the net tree

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Shrikrishna Khare &lt;skhare@vmware.com&gt;
CC: "VMware, Inc." &lt;pv-drivers@vmware.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver: Vmxnet3: Update Rx ring 2 max size</title>
<updated>2016-02-22T03:04:15+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-02-19T19:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=14112ca5625db8a7fbdc724783510751577a8a1b'/>
<id>14112ca5625db8a7fbdc724783510751577a8a1b</id>
<content type='text'>
Device emulation supports max size of 4096.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.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>
Device emulation supports max size of 4096.

Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver: Vmxnet3: Fix regression caused by 5738a09</title>
<updated>2016-01-06T21:20:13+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2016-01-06T18:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=58caf637365fef97c8e84ea5699a8e34d68fce93'/>
<id>58caf637365fef97c8e84ea5699a8e34d68fce93</id>
<content type='text'>
Reported-by: Bingkuo Liu &lt;bingkuol@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.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>
Reported-by: Bingkuo Liu &lt;bingkuol@vmware.com&gt;
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vmxnet3: fix checks for dma mapping errors</title>
<updated>2015-12-01T20:19:16+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2015-11-27T22:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5738a09d58d5ad2871f1f9a42bf6a3aa9ece5b3c'/>
<id>5738a09d58d5ad2871f1f9a42bf6a3aa9ece5b3c</id>
<content type='text'>
vmxnet3_drv does not check dma_addr with dma_mapping_error()
after mapping dma memory. The patch adds the checks and
tries to handle failures.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Acked-by: Shrikrishna Khare &lt;skhare@vmware.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>
vmxnet3_drv does not check dma_addr with dma_mapping_error()
after mapping dma memory. The patch adds the checks and
tries to handle failures.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Acked-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver: Vmxnet3: Fix use of mfTableLen for big endian architectures</title>
<updated>2015-11-16T20:06:47+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2015-11-13T23:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d37d5ec861b0d937c0bdd70f0138e2750aacccdb'/>
<id>d37d5ec861b0d937c0bdd70f0138e2750aacccdb</id>
<content type='text'>
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Reported-by: Masao Uebayashi &lt;uebayasi@gmail.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.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>
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Reported-by: Masao Uebayashi &lt;uebayasi@gmail.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net: get rid of unnecessary initializations in .get_drvinfo()</title>
<updated>2015-10-16T07:24:10+00:00</updated>
<author>
<name>Ivan Vecera</name>
<email>ivecera@redhat.com</email>
</author>
<published>2015-10-15T19:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=47ea0325337b166c1c8695119aa6e83cdc035ef5'/>
<id>47ea0325337b166c1c8695119aa6e83cdc035ef5</id>
<content type='text'>
Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len,
eedump_len &amp; regdump_len fields in their .get_drvinfo() ethtool op.
It's not necessary as these fields is filled in ethtool_get_drvinfo().

v2: removed unused variable
v3: removed another unused variable

Signed-off-by: Ivan Vecera &lt;ivecera@redhat.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>
Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len,
eedump_len &amp; regdump_len fields in their .get_drvinfo() ethtool op.
It's not necessary as these fields is filled in ethtool_get_drvinfo().

v2: removed unused variable
v3: removed another unused variable

Signed-off-by: Ivan Vecera &lt;ivecera@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver: Vmxnet3: Extend register dump support</title>
<updated>2015-09-23T22:06:27+00:00</updated>
<author>
<name>Shrikrishna Khare</name>
<email>skhare@vmware.com</email>
</author>
<published>2015-09-22T03:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b6bd9b5448a9362e3ca33b21f1461baa5500520f'/>
<id>b6bd9b5448a9362e3ca33b21f1461baa5500520f</id>
<content type='text'>
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.com&gt;
Acked-by: Srividya Murali &lt;smurali@vmware.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>
Signed-off-by: Shrikrishna Khare &lt;skhare@vmware.com&gt;
Signed-off-by: Bhavesh Davda &lt;bhavesh@vmware.com&gt;
Acked-by: Srividya Murali &lt;smurali@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
