<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/ulp/ipoib, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-01-09T07:21:58Z</updated>
<entry>
<title>IPoIB: Avoid reading an uninitialized member variable</title>
<updated>2017-01-09T07:21:58Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2016-11-21T18:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37d4adba02d34bce1fa94769a922ef88e1cbcc34'/>
<id>urn:sha1:37d4adba02d34bce1fa94769a922ef88e1cbcc34</id>
<content type='text'>
commit 11b642b84e8c43e8597de031678d15c08dd057bc upstream.

This patch avoids that Coverity reports the following:

    Using uninitialized value port_attr.state when calling printk

Fixes: commit 94232d9ce817 ("IPoIB: Start multicast join process only on active ports")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>IB/ipoib: move back IB LL address into the hard header</title>
<updated>2016-11-15T06:48:52Z</updated>
<author>
<name>Paolo Abeni</name>
</author>
<published>2016-10-13T16:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27bb6e31d32d12cbfc8e56c198c86961e01d6da2'/>
<id>urn:sha1:27bb6e31d32d12cbfc8e56c198c86961e01d6da2</id>
<content type='text'>
[ Upstream commit fc791b6335152c5278dc4a4991bcb2d329f806f9 ]

After the commit 9207f9d45b0a ("net: preserve IP control block
during GSO segmentation"), the GSO CB and the IPoIB CB conflict.
That destroy the IPoIB address information cached there,
causing a severe performance regression, as better described here:

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

This change moves the data cached by the IPoIB driver from the
skb control lock into the IPoIB hard header, as done before
the commit 936d7de3d736 ("IPoIB: Stop lying about hard_header_len
and use skb-&gt;cb to stash LL addresses").
In order to avoid GRO issue, on packet reception, the IPoIB driver
stash into the skb a dummy pseudo header, so that the received
packets have actually a hard header matching the declared length.
To avoid changing the connected mode maximum mtu, the allocated
head buffer size is increased by the pseudo header length.

After this commit, IPoIB performances are back to pre-regression
value.

v2 -&gt; v3: rebased
v1 -&gt; v2: avoid changing the max mtu, increasing the head buf size

Fixes: 9207f9d45b0a ("net: preserve IP control block during GSO segmentation")
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/ipoib: Don't allow MC joins during light MC flush</title>
<updated>2016-09-16T18:14:08Z</updated>
<author>
<name>Alex Vesker</name>
</author>
<published>2016-09-12T06:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=344bacca8cd811809fc33a249f2738ab757d327f'/>
<id>urn:sha1:344bacca8cd811809fc33a249f2738ab757d327f</id>
<content type='text'>
This fix solves a race between light flush and on the fly joins.
Light flush doesn't set the device to down and unset IPOIB_OPER_UP
flag, this means that if while flushing we have a MC join in progress
and the QP was attached to BC MGID we can have a mismatches when
re-attaching a QP to the BC MGID.

The light flush would set the broadcast group to NULL causing an on
the fly join to rejoin and reattach to the BC MCG as well as adding
the BC MGID to the multicast list. The flush process would later on
remove the BC MGID and detach it from the QP. On the next flush
the BC MGID is present in the multicast list but not found when trying
to detach it because of the previous double attach and single detach.

[18332.714265] ------------[ cut here ]------------
[18332.717775] WARNING: CPU: 6 PID: 3767 at drivers/infiniband/core/verbs.c:280 ib_dealloc_pd+0xff/0x120 [ib_core]
...
[18332.775198] Hardware name: Red Hat KVM, BIOS Bochs 01/01/2011
[18332.779411]  0000000000000000 ffff8800b50dfbb0 ffffffff813fed47 0000000000000000
[18332.784960]  0000000000000000 ffff8800b50dfbf0 ffffffff8109add1 0000011832f58300
[18332.790547]  ffff880226a596c0 ffff880032482000 ffff880032482830 ffff880226a59280
[18332.796199] Call Trace:
[18332.798015]  [&lt;ffffffff813fed47&gt;] dump_stack+0x63/0x8c
[18332.801831]  [&lt;ffffffff8109add1&gt;] __warn+0xd1/0xf0
[18332.805403]  [&lt;ffffffff8109aebd&gt;] warn_slowpath_null+0x1d/0x20
[18332.809706]  [&lt;ffffffffa025d90f&gt;] ib_dealloc_pd+0xff/0x120 [ib_core]
[18332.814384]  [&lt;ffffffffa04f3d7c&gt;] ipoib_transport_dev_cleanup+0xfc/0x1d0 [ib_ipoib]
[18332.820031]  [&lt;ffffffffa04ed648&gt;] ipoib_ib_dev_cleanup+0x98/0x110 [ib_ipoib]
[18332.825220]  [&lt;ffffffffa04e62c8&gt;] ipoib_dev_cleanup+0x2d8/0x550 [ib_ipoib]
[18332.830290]  [&lt;ffffffffa04e656f&gt;] ipoib_uninit+0x2f/0x40 [ib_ipoib]
[18332.834911]  [&lt;ffffffff81772a8a&gt;] rollback_registered_many+0x1aa/0x2c0
[18332.839741]  [&lt;ffffffff81772bd1&gt;] rollback_registered+0x31/0x40
[18332.844091]  [&lt;ffffffff81773b18&gt;] unregister_netdevice_queue+0x48/0x80
[18332.848880]  [&lt;ffffffffa04f489b&gt;] ipoib_vlan_delete+0x1fb/0x290 [ib_ipoib]
[18332.853848]  [&lt;ffffffffa04df1cd&gt;] delete_child+0x7d/0xf0 [ib_ipoib]
[18332.858474]  [&lt;ffffffff81520c08&gt;] dev_attr_store+0x18/0x30
[18332.862510]  [&lt;ffffffff8127fe4a&gt;] sysfs_kf_write+0x3a/0x50
[18332.866349]  [&lt;ffffffff8127f4e0&gt;] kernfs_fop_write+0x120/0x170
[18332.870471]  [&lt;ffffffff81207198&gt;] __vfs_write+0x28/0xe0
[18332.874152]  [&lt;ffffffff810e09bf&gt;] ? percpu_down_read+0x1f/0x50
[18332.878274]  [&lt;ffffffff81208062&gt;] vfs_write+0xa2/0x1a0
[18332.881896]  [&lt;ffffffff812093a6&gt;] SyS_write+0x46/0xa0
[18332.885632]  [&lt;ffffffff810039b7&gt;] do_syscall_64+0x57/0xb0
[18332.889709]  [&lt;ffffffff81883321&gt;] entry_SYSCALL64_slow_path+0x25/0x25
[18332.894727] ---[ end trace 09ebbe31f831ef17 ]---

Fixes: ee1e2c82c245 ("IPoIB: Refresh paths instead of flushing them on SM change events")
Signed-off-by: Alex Vesker &lt;valex@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/ipoib: Fix memory corruption in ipoib cm mode connect flow</title>
<updated>2016-09-02T18:07:38Z</updated>
<author>
<name>Erez Shitrit</name>
</author>
<published>2016-08-28T07:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=546481c2816ea3c061ee9d5658eb48070f69212e'/>
<id>urn:sha1:546481c2816ea3c061ee9d5658eb48070f69212e</id>
<content type='text'>
When a new CM connection is being requested, ipoib driver copies data
from the path pointer in the CM/tx object, the path object might be
invalid at the point and memory corruption will happened later when now
the CM driver will try using that data.

The next scenario demonstrates it:
	neigh_add_path --&gt; ipoib_cm_create_tx --&gt;
	queue_work (pointer to path is in the cm/tx struct)
	#while the work is still in the queue,
	#the port goes down and causes the ipoib_flush_paths:
	ipoib_flush_paths --&gt; path_free --&gt; kfree(path)
	#at this point the work scheduled starts.
	ipoib_cm_tx_start --&gt; copy from the (invalid)path pointer:
	(memcpy(&amp;pathrec, &amp;p-&gt;path-&gt;pathrec, sizeof pathrec);)
	 -&gt; memory corruption.

To fix that the driver now starts the CM/tx connection only if that
specific path exists in the general paths database.
This check is protected with the relevant locks, and uses the gid from
the neigh member in the CM/tx object which is valid according to the ref
count that was taken by the CM/tx.

Fixes: 839fcaba35 ('IPoIB: Connected mode experimental support')
Signed-off-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'misc' and 'rxe' into k.o/for-4.8-1</title>
<updated>2016-08-04T15:13:47Z</updated>
<author>
<name>Doug Ledford</name>
</author>
<published>2016-08-04T15:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f1d25b47d919cef29388aff37e7b074e65bf512'/>
<id>urn:sha1:7f1d25b47d919cef29388aff37e7b074e65bf512</id>
<content type='text'>
</content>
</entry>
<entry>
<title>IB/ipoib: Report SG feature regardless of HW UD CSUM capability</title>
<updated>2016-08-04T01:03:32Z</updated>
<author>
<name>Yuval Shaia</name>
</author>
<published>2016-07-20T08:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5faba546952289a7306eae48df04e6159164c600'/>
<id>urn:sha1:5faba546952289a7306eae48df04e6159164c600</id>
<content type='text'>
Decouple SG support from HW ability to do UD checksum.
This coupling is for historical reasons and removed with 'commit
ec5f06156423 ("net: Kill link between CSUM and SG features.")'

During driver load it is assumed that device does not supports SG. The
final decision is taken after creating UD QP based on device capability.

Signed-off-by: Yuval Shaia &lt;yuval.shaia@oracle.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/ipoib: Use new device FW version string</title>
<updated>2016-06-23T16:08:34Z</updated>
<author>
<name>Ira Weiny</name>
</author>
<published>2016-06-15T06:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a8632121a5e5bdebef00e59bd13951355682bab'/>
<id>urn:sha1:1a8632121a5e5bdebef00e59bd13951355682bab</id>
<content type='text'>
Using this allows for devices to specify the format of their
firmware version rather than forcing a format.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/IPoIB: Don't update neigh validity for unresolved entries</title>
<updated>2016-06-07T14:49:48Z</updated>
<author>
<name>Erez Shitrit</name>
</author>
<published>2016-06-04T12:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61c78eea9516a921799c17b4c20558e2aa780fd3'/>
<id>urn:sha1:61c78eea9516a921799c17b4c20558e2aa780fd3</id>
<content type='text'>
ipoib_neigh_get unconditionally updates the "alive" variable member on
any packet send.  This prevents the neighbor garbage collection from
cleaning out a dead neighbor entry if we are still queueing packets
for it.  If the queue for this neighbor is full, then don't update the
alive timestamp.  That way the neighbor can time out even if packets
are still being queued as long as none of them are being sent.

Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path")
Signed-off-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/IPoIB: Disable bottom half when dealing with device address</title>
<updated>2016-06-07T13:50:54Z</updated>
<author>
<name>Mark Bloch</name>
</author>
<published>2016-06-04T12:15:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b29953bf8ca23944c5e00dcc15ad7bd9fecdd4e'/>
<id>urn:sha1:9b29953bf8ca23944c5e00dcc15ad7bd9fecdd4e</id>
<content type='text'>
Align locking usage when touching device address with rest
of the kernel. Lock the bottom half when doing so using
netif_addr_lock_bh.

This also solves the following case as reported by lockdep:
	CPU0                    CPU1
	----                    ----
lock(_xmit_INFINIBAND);
				local_irq_disable();
				lock(&amp;(&amp;mc-&gt;mca_lock)-&gt;rlock);
				lock(_xmit_INFINIBAND);
&lt;Interrupt&gt;
lock(&amp;(&amp;mc-&gt;mca_lock)-&gt;rlock);

*** DEADLOCK ***

Fixes: 492a7e67ff83 ("IB/IPoIB: Allow setting the device address")
Signed-off-by: Mark Bloch &lt;markb@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/IPoIB: Fix race between ipoib_remove_one to sysfs functions</title>
<updated>2016-06-07T13:50:53Z</updated>
<author>
<name>Erez Shitrit</name>
</author>
<published>2016-06-04T12:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=198b12f77084244d310888dd5d643083cb5c2aa1'/>
<id>urn:sha1:198b12f77084244d310888dd5d643083cb5c2aa1</id>
<content type='text'>
In ipoib_remove_one the driver holds the rtnl_lock and tries to do some
operation like dev_change_flags or unregister_netdev, while sysfs
callback like ipoib_vlan_delete holds sysfs mutex and tries to hold the
rtnl_lock via rtnl_trylock() and restart_syscall() if the lock is not
free, meanwhile ipoib_remove_one tries to get the sysfs lock in order to
free its sysfs directory, and we will get  a-&gt;b, b-&gt;a deadlock.

    Trace like the following:

        schedule+0x37/0x80
        schedule_preempt_disabled+0xe/0x10
        __mutex_lock_slowpath+0xb5/0x120
        mutex_lock+0x23/0x40
        rtnl_lock+0x15/0x20
        netdev_run_todo+0x17c/0x320
        rtnl_unlock+0xe/0x10
        ipoib_vlan_delete+0x11b/0x1b0 [ib_ipoib]
        delete_child+0x54/0x80 [ib_ipoib]
        dev_attr_store+0x18/0x30
        sysfs_kf_write+0x37/0x40
        mutex_lock+0x16/0x40
        SyS_write+0x55/0xc0
        entry_SYSCALL_64_fastpath+0x16/0x75
    And
        schedule+0x37/0x80
        __kernfs_remove+0x1a8/0x260
        ? wake_atomic_t_function+0x60/0x60
        kernfs_remove+0x25/0x40
        sysfs_remove_dir+0x50/0x80
        kobject_del+0x18/0x50
        device_del+0x19f/0x260
        netdev_unregister_kobject+0x6a/0x80
        rollback_registered_many+0x1fd/0x340
        rollback_registered+0x3c/0x70
        unregister_netdevice_queue+0x55/0xc0
        unregister_netdev+0x20/0x30
        ipoib_remove_one+0x114/0x1b0 [ib_ipoib]
        ib_unregister_client+0x4a/0x170 [ib_core]
        ? find_module_all+0x71/0xa0
        ipoib_cleanup_module+0x10/0x94 [ib_ipoib]
        SyS_delete_module+0x1b5/0x210
        entry_SYSCALL_64_fastpath+0x16/0x75

The fix is by checking the flag IPOIB_FLAG_INTF_ON_DESTROY in order to
get out from the sysfs function.

Fixes: 862096a8bbf8 ("IB/ipoib: Add more rtnl_link_ops callbacks")
Fixes: 9baa0b036410 ("IB/ipoib: Add rtnl_link_ops support")
Signed-off-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
</feed>
