<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/ethernet/intel, branch linux-3.19.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>e1000: add dummy allocator to fix race condition between mtu change and netpoll</title>
<updated>2015-05-06T20:02:04+00:00</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2015-02-26T05:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b5d458c11722dc457541d0e1f8231a63031d924e'/>
<id>b5d458c11722dc457541d0e1f8231a63031d924e</id>
<content type='text'>
commit 08e8331654d1d7b2c58045e549005bc356aa7810 upstream.

There is a race condition between e1000_change_mtu's cleanups and
netpoll, when we change the MTU across jumbo size:

Changing MTU frees all the rx buffers:
    e1000_change_mtu -&gt; e1000_down -&gt; e1000_clean_all_rx_rings -&gt;
        e1000_clean_rx_ring

Then, close to the end of e1000_change_mtu:
    pr_info -&gt; ... -&gt; netpoll_poll_dev -&gt; e1000_clean -&gt;
        e1000_clean_rx_irq -&gt; e1000_alloc_rx_buffers -&gt; e1000_alloc_frag

And when we come back to do the rest of the MTU change:
    e1000_up -&gt; e1000_configure -&gt; e1000_configure_rx -&gt;
        e1000_alloc_jumbo_rx_buffers

alloc_jumbo finds the buffers already != NULL, since data (shared with
page in e1000_rx_buffer-&gt;rxbuf) has been re-alloc'd, but it's garbage,
or at least not what is expected when in jumbo state.

This results in an unusable adapter (packets don't get through), and a
NULL pointer dereference on the next call to e1000_clean_rx_ring
(other mtu change, link down, shutdown):

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff81194d6e&gt;] put_compound_page+0x7e/0x330

    [...]

Call Trace:
 [&lt;ffffffff81195445&gt;] put_page+0x55/0x60
 [&lt;ffffffff815d9f44&gt;] e1000_clean_rx_ring+0x134/0x200
 [&lt;ffffffff815da055&gt;] e1000_clean_all_rx_rings+0x45/0x60
 [&lt;ffffffff815df5e0&gt;] e1000_down+0x1c0/0x1d0
 [&lt;ffffffff811e2260&gt;] ? deactivate_slab+0x7f0/0x840
 [&lt;ffffffff815e21bc&gt;] e1000_change_mtu+0xdc/0x170
 [&lt;ffffffff81647050&gt;] dev_set_mtu+0xa0/0x140
 [&lt;ffffffff81664218&gt;] do_setlink+0x218/0xac0
 [&lt;ffffffff814459e9&gt;] ? nla_parse+0xb9/0x120
 [&lt;ffffffff816652d0&gt;] rtnl_newlink+0x6d0/0x890
 [&lt;ffffffff8104f000&gt;] ? kvm_clock_read+0x20/0x40
 [&lt;ffffffff810a2068&gt;] ? sched_clock_cpu+0xa8/0x100
 [&lt;ffffffff81663802&gt;] rtnetlink_rcv_msg+0x92/0x260

By setting the allocator to a dummy version, netpoll can't mess up our
rx buffers.  The allocator is set back to a sane value in
e1000_configure_rx.

Fixes: edbbb3ca1077 ("e1000: implement jumbo receive with partial descriptors")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 08e8331654d1d7b2c58045e549005bc356aa7810 upstream.

There is a race condition between e1000_change_mtu's cleanups and
netpoll, when we change the MTU across jumbo size:

Changing MTU frees all the rx buffers:
    e1000_change_mtu -&gt; e1000_down -&gt; e1000_clean_all_rx_rings -&gt;
        e1000_clean_rx_ring

Then, close to the end of e1000_change_mtu:
    pr_info -&gt; ... -&gt; netpoll_poll_dev -&gt; e1000_clean -&gt;
        e1000_clean_rx_irq -&gt; e1000_alloc_rx_buffers -&gt; e1000_alloc_frag

And when we come back to do the rest of the MTU change:
    e1000_up -&gt; e1000_configure -&gt; e1000_configure_rx -&gt;
        e1000_alloc_jumbo_rx_buffers

alloc_jumbo finds the buffers already != NULL, since data (shared with
page in e1000_rx_buffer-&gt;rxbuf) has been re-alloc'd, but it's garbage,
or at least not what is expected when in jumbo state.

This results in an unusable adapter (packets don't get through), and a
NULL pointer dereference on the next call to e1000_clean_rx_ring
(other mtu change, link down, shutdown):

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff81194d6e&gt;] put_compound_page+0x7e/0x330

    [...]

Call Trace:
 [&lt;ffffffff81195445&gt;] put_page+0x55/0x60
 [&lt;ffffffff815d9f44&gt;] e1000_clean_rx_ring+0x134/0x200
 [&lt;ffffffff815da055&gt;] e1000_clean_all_rx_rings+0x45/0x60
 [&lt;ffffffff815df5e0&gt;] e1000_down+0x1c0/0x1d0
 [&lt;ffffffff811e2260&gt;] ? deactivate_slab+0x7f0/0x840
 [&lt;ffffffff815e21bc&gt;] e1000_change_mtu+0xdc/0x170
 [&lt;ffffffff81647050&gt;] dev_set_mtu+0xa0/0x140
 [&lt;ffffffff81664218&gt;] do_setlink+0x218/0xac0
 [&lt;ffffffff814459e9&gt;] ? nla_parse+0xb9/0x120
 [&lt;ffffffff816652d0&gt;] rtnl_newlink+0x6d0/0x890
 [&lt;ffffffff8104f000&gt;] ? kvm_clock_read+0x20/0x40
 [&lt;ffffffff810a2068&gt;] ? sched_clock_cpu+0xa8/0x100
 [&lt;ffffffff81663802&gt;] rtnetlink_rcv_msg+0x92/0x260

By setting the allocator to a dummy version, netpoll can't mess up our
rx buffers.  The allocator is set back to a sane value in
e1000_configure_rx.

Fixes: edbbb3ca1077 ("e1000: implement jumbo receive with partial descriptors")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ixgbevf: Fix checksum error when using stacked vlan</title>
<updated>2015-01-31T02:03:47+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2015-01-29T11:37:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=10e4fb333c9ad72491f80bed018f8007e17060d1'/>
<id>10e4fb333c9ad72491f80bed018f8007e17060d1</id>
<content type='text'>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
ixgbevf_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use first-&gt;protocol instead of skb-&gt;protocol to get the proper network
protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&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>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
ixgbevf_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use first-&gt;protocol instead of skb-&gt;protocol to get the proper network
protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ixgbe: Fix checksum error when using stacked vlan</title>
<updated>2015-01-31T02:03:47+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2015-01-29T11:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0213668f060ea966ee8f4e6334f0fd27b6a1c428'/>
<id>0213668f060ea966ee8f4e6334f0fd27b6a1c428</id>
<content type='text'>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
ixgbe_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use vlan_get_protocol() to get the proper network protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&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>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
ixgbe_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use vlan_get_protocol() to get the proper network protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igbvf: Fix checksum error when using stacked vlan</title>
<updated>2015-01-31T02:03:47+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2015-01-29T11:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72b1405964c19b99ad9f75340249b16305cf31ab'/>
<id>72b1405964c19b99ad9f75340249b16305cf31ab</id>
<content type='text'>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
igbvf_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use vlan_get_protocol() to get the proper network protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&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>
When a skb has multiple vlans and it is CHECKSUM_PARTIAL,
igbvf_tx_csum() fails to get the network protocol and checksum related
descriptor fields are not configured correctly because skb-&gt;protocol
doesn't show the L3 protocol in this case.

Use vlan_get_protocol() to get the proper network protocol.

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i40e: adds FCoE configure option</title>
<updated>2015-01-14T21:48:39+00:00</updated>
<author>
<name>Vasu Dev</name>
<email>vasu.dev@intel.com</email>
</author>
<published>2015-01-14T13:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=776d4e9f5c0229037707f692b386b1f2a5bac054'/>
<id>776d4e9f5c0229037707f692b386b1f2a5bac054</id>
<content type='text'>
Adds FCoE config option I40E_FCOE, so that FCoE can be enabled
as needed but otherwise have it disabled by default.

This also eliminate multiple FCoE config checks, instead now just
one config check for CONFIG_I40E_FCOE.

The I40E FCoE was added with 3.17 kernel and therefore this patch
shall be applied to stable 3.17 kernel also.

CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Jim Young &lt;jamesx.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@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>
Adds FCoE config option I40E_FCOE, so that FCoE can be enabled
as needed but otherwise have it disabled by default.

This also eliminate multiple FCoE config checks, instead now just
one config check for CONFIG_I40E_FCOE.

The I40E FCoE was added with 3.17 kernel and therefore this patch
shall be applied to stable 3.17 kernel also.

CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Jim Young &lt;jamesx.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i40e: Fix bug with TCP over IPv6 over VXLAN</title>
<updated>2015-01-07T01:15:03+00:00</updated>
<author>
<name>Anjali Singhai</name>
<email>anjali.singhai@intel.com</email>
</author>
<published>2014-12-19T02:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=df23075fc82578a8d9cd617148fba3b90755ffb5'/>
<id>df23075fc82578a8d9cd617148fba3b90755ffb5</id>
<content type='text'>
The driver was examining the outer protocol layer to set the inner protocol
layer checksum offload.  In the case of TCP over IPV6 over an IPv4 based
VXLAN the inner checksum offloads would be set to look for IPv4/UDP instead
of IPv6/TCP.  This code fixes that so that the driver will look at the
proper layer for encapsulation offload settings.

Signed-off-by: Anjali Singhai &lt;anjali.singhai@intel.com&gt;
Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver was examining the outer protocol layer to set the inner protocol
layer checksum offload.  In the case of TCP over IPV6 over an IPv4 based
VXLAN the inner checksum offloads would be set to look for IPv4/UDP instead
of IPv6/TCP.  This code fixes that so that the driver will look at the
proper layer for encapsulation offload settings.

Signed-off-by: Anjali Singhai &lt;anjali.singhai@intel.com&gt;
Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i40e: Fix Rx checksum error counter</title>
<updated>2015-01-07T01:14:57+00:00</updated>
<author>
<name>Anjali Singhai</name>
<email>anjali.singhai@intel.com</email>
</author>
<published>2014-12-19T02:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f6385979d6dd670ce2dd93d4684579dd1d1d2435'/>
<id>f6385979d6dd670ce2dd93d4684579dd1d1d2435</id>
<content type='text'>
The Rx port checksum error counter was incrementing incorrectly with
UDP encapsulated tunneled traffic.  This patch fixes the problem so that
the port_rx_csum counter will show accurate statistics.

Signed-off-by: Anjali Singhai &lt;anjali.singhai@intel.com&gt;
Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Tested-by: Jim Young &lt;james.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Rx port checksum error counter was incrementing incorrectly with
UDP encapsulated tunneled traffic.  This patch fixes the problem so that
the port_rx_csum counter will show accurate statistics.

Signed-off-by: Anjali Singhai &lt;anjali.singhai@intel.com&gt;
Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Tested-by: Jim Young &lt;james.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i40e: fix un-necessary Tx hangs</title>
<updated>2015-01-07T00:57:18+00:00</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2015-01-07T02:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d91649f5b719cd9d69206af7b3c4b4f6645e3b1e'/>
<id>d91649f5b719cd9d69206af7b3c4b4f6645e3b1e</id>
<content type='text'>
When the driver was polling with interrupts disabled the hardware
will occasionally not write back descriptors.  This patch causes
the driver to detect this situation and force an interrupt to
fire which will flush the stuck descriptor.  Does not conflict
with napi because if we are already polling the napi_schedule is
ignored.  Additionally the extra interrupts are rate limited, so
don't cause a burden to the CPU.

Change-ID: Iba4616d2a71288672a5f08e4512e2704b97335e8
Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the driver was polling with interrupts disabled the hardware
will occasionally not write back descriptors.  This patch causes
the driver to detect this situation and force an interrupt to
fire which will flush the stuck descriptor.  Does not conflict
with napi because if we are already polling the napi_schedule is
ignored.  Additionally the extra interrupts are rate limited, so
don't cause a burden to the CPU.

Change-ID: Iba4616d2a71288672a5f08e4512e2704b97335e8
Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i40e: Fix possible memory leak in i40e_dbg_dump_desc</title>
<updated>2014-12-31T23:40:12+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-08T04:28:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e3fe44c75913076b06ca0d0b79c21ce326ce3ef8'/>
<id>e3fe44c75913076b06ca0d0b79c21ce326ce3ef8</id>
<content type='text'>
I didn't notice that return in the code, fix it by
adding a goto out instead to free the memory.

Fixes:

&gt; New smatch warnings:
&gt; drivers/net/ethernet/intel/i40e/i40e_debugfs.c:832 i40e_dbg_dump_desc() warn: possible memory leak of 'ring'

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Tested-by: Jim Young &lt;james.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I didn't notice that return in the code, fix it by
adding a goto out instead to free the memory.

Fixes:

&gt; New smatch warnings:
&gt; drivers/net/ethernet/intel/i40e/i40e_debugfs.c:832 i40e_dbg_dump_desc() warn: possible memory leak of 'ring'

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Tested-by: Jim Young &lt;james.m.young@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igb: Remove unneeded FIXME</title>
<updated>2014-12-31T20:11:06+00:00</updated>
<author>
<name>Todd Fujinaka</name>
<email>todd.fujinaka@intel.com</email>
</author>
<published>2014-11-27T01:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2184aa3d0f6f952ca55b9daeaeb9d1e3d6b74a83'/>
<id>2184aa3d0f6f952ca55b9daeaeb9d1e3d6b74a83</id>
<content type='text'>
Remove a FIXME comment that was missed in a commit on 1/2007.

Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Reported-by: nick &lt;xerofoify@gmail.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove a FIXME comment that was missed in a commit on 1/2007.

Signed-off-by: Todd Fujinaka &lt;todd.fujinaka@intel.com&gt;
Reported-by: nick &lt;xerofoify@gmail.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
