<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/infiniband, branch v4.4.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>IB/cma: Fix RDMA port validation for iWarp</title>
<updated>2016-03-03T23:07:32+00:00</updated>
<author>
<name>Matan Barak</name>
<email>matanb@mellanox.com</email>
</author>
<published>2016-01-07T09:19:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9315bf18bec590aa0c4be5b54de55da21d31ac96'/>
<id>9315bf18bec590aa0c4be5b54de55da21d31ac96</id>
<content type='text'>
commit 649367735ee5dedb128d9fac0b86ba7e0fe7ae3b upstream.

cma_validate_port wrongly assumed that Ethernet devices are RoCE
devices and thus their ndev should be matched in the GID table.
This broke the iWarp support. Fixing that matching the ndev only if
we work on a RoCE port.

Cc: &lt;stable@vger.kernel.org&gt; # 4.4.x-
Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
		     and netdevice')
Reported-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Tested-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Reviewed-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Steve Wise &lt;swise@opengridcomputing.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 649367735ee5dedb128d9fac0b86ba7e0fe7ae3b upstream.

cma_validate_port wrongly assumed that Ethernet devices are RoCE
devices and thus their ndev should be matched in the GID table.
This broke the iWarp support. Fixing that matching the ndev only if
we work on a RoCE port.

Cc: &lt;stable@vger.kernel.org&gt; # 4.4.x-
Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port
		     and netdevice')
Reported-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Tested-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Reviewed-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>IB/mlx5: Expose correct maximum number of CQE capacity</title>
<updated>2016-03-03T23:07:25+00:00</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@mellanox.com</email>
</author>
<published>2016-01-14T06:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f59395e47008b7a6fafbf56b657222c57b1a92a'/>
<id>2f59395e47008b7a6fafbf56b657222c57b1a92a</id>
<content type='text'>
commit 9f17768611ebf81dfac69948dd12622b6f2e45fc upstream.

Maximum number of EQE capacity per CQ was mistakenly exposed
as CQE. Fix that.

Fixes: 938fe83c8dcb ("net/mlx5_core: New device capabilities handling")
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9f17768611ebf81dfac69948dd12622b6f2e45fc upstream.

Maximum number of EQE capacity per CQ was mistakenly exposed
as CQE. Fix that.

Fixes: 938fe83c8dcb ("net/mlx5_core: New device capabilities handling")
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/qib: Support creating qps with GFP_NOIO flag</title>
<updated>2016-03-03T23:07:25+00:00</updated>
<author>
<name>Vinit Agnihotri</name>
<email>vinit.abhay.agnihotri@intel.com</email>
</author>
<published>2016-01-11T17:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e759d3185f48fbeb6e4e3f741120c7689741decd'/>
<id>e759d3185f48fbeb6e4e3f741120c7689741decd</id>
<content type='text'>
commit fbbeb8632bf0b46ab44cfcedc4654cd7831b7161 upstream.

The current code is problematic when the QP creation and ipoib is used to
support NFS and NFS desires to do IO for paging purposes. In that case, the
GFP_KERNEL allocation in qib_qp.c causes a deadlock in tight memory
situations.

This fix adds support to create queue pair with GFP_NOIO flag for connected
mode only to cleanly fail the create queue pair in those situations.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Vinit Agnihotri &lt;vinit.abhay.agnihotri@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.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 fbbeb8632bf0b46ab44cfcedc4654cd7831b7161 upstream.

The current code is problematic when the QP creation and ipoib is used to
support NFS and NFS desires to do IO for paging purposes. In that case, the
GFP_KERNEL allocation in qib_qp.c causes a deadlock in tight memory
situations.

This fix adds support to create queue pair with GFP_NOIO flag for connected
mode only to cleanly fail the create queue pair in those situations.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Vinit Agnihotri &lt;vinit.abhay.agnihotri@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/qib: fix mcast detach when qp not attached</title>
<updated>2016-03-03T23:07:25+00:00</updated>
<author>
<name>Mike Marciniszyn</name>
<email>mike.marciniszyn@intel.com</email>
</author>
<published>2016-01-07T21:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7bf68a0afc0f367118ac765081f19c8cfd93823f'/>
<id>7bf68a0afc0f367118ac765081f19c8cfd93823f</id>
<content type='text'>
commit 09dc9cd6528f5b52bcbd3292a6312e762c85260f upstream.

The code produces the following trace:

[1750924.419007] general protection fault: 0000 [#3] SMP
[1750924.420364] Modules linked in: nfnetlink autofs4 rpcsec_gss_krb5 nfsv4
dcdbas rfcomm bnep bluetooth nfsd auth_rpcgss nfs_acl dm_multipath nfs lockd
scsi_dh sunrpc fscache radeon ttm drm_kms_helper drm serio_raw parport_pc
ppdev i2c_algo_bit lpc_ich ipmi_si ib_mthca ib_qib dca lp parport ib_ipoib
mac_hid ib_cm i3000_edac ib_sa ib_uverbs edac_core ib_umad ib_mad ib_core
ib_addr tg3 ptp dm_mirror dm_region_hash dm_log psmouse pps_core
[1750924.420364] CPU: 1 PID: 8401 Comm: python Tainted: G D
3.13.0-39-generic #66-Ubuntu
[1750924.420364] Hardware name: Dell Computer Corporation PowerEdge
860/0XM089, BIOS A04 07/24/2007
[1750924.420364] task: ffff8800366a9800 ti: ffff88007af1c000 task.ti:
ffff88007af1c000
[1750924.420364] RIP: 0010:[&lt;ffffffffa0131d51&gt;] [&lt;ffffffffa0131d51&gt;]
qib_mcast_qp_free+0x11/0x50 [ib_qib]
[1750924.420364] RSP: 0018:ffff88007af1dd70  EFLAGS: 00010246
[1750924.420364] RAX: 0000000000000001 RBX: ffff88007b822688 RCX:
000000000000000f
[1750924.420364] RDX: ffff88007b822688 RSI: ffff8800366c15a0 RDI:
6764697200000000
[1750924.420364] RBP: ffff88007af1dd78 R08: 0000000000000001 R09:
0000000000000000
[1750924.420364] R10: 0000000000000011 R11: 0000000000000246 R12:
ffff88007baa1d98
[1750924.420364] R13: ffff88003ecab000 R14: ffff88007b822660 R15:
0000000000000000
[1750924.420364] FS:  00007ffff7fd8740(0000) GS:ffff88007fc80000(0000)
knlGS:0000000000000000
[1750924.420364] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[1750924.420364] CR2: 00007ffff597c750 CR3: 000000006860b000 CR4:
00000000000007e0
[1750924.420364] Stack:
[1750924.420364]  ffff88007b822688 ffff88007af1ddf0 ffffffffa0132429
000000007af1de20
[1750924.420364]  ffff88007baa1dc8 ffff88007baa0000 ffff88007af1de70
ffffffffa00cb313
[1750924.420364]  00007fffffffde88 0000000000000000 0000000000000008
ffff88003ecab000
[1750924.420364] Call Trace:
[1750924.420364]  [&lt;ffffffffa0132429&gt;] qib_multicast_detach+0x1e9/0x350
[ib_qib]
[1750924.568035]  [&lt;ffffffffa00cb313&gt;] ? ib_uverbs_modify_qp+0x323/0x3d0
[ib_uverbs]
[1750924.568035]  [&lt;ffffffffa0092d61&gt;] ib_detach_mcast+0x31/0x50 [ib_core]
[1750924.568035]  [&lt;ffffffffa00cc213&gt;] ib_uverbs_detach_mcast+0x93/0x170
[ib_uverbs]
[1750924.568035]  [&lt;ffffffffa00c61f6&gt;] ib_uverbs_write+0xc6/0x2c0 [ib_uverbs]
[1750924.568035]  [&lt;ffffffff81312e68&gt;] ? apparmor_file_permission+0x18/0x20
[1750924.568035]  [&lt;ffffffff812d4cd3&gt;] ? security_file_permission+0x23/0xa0
[1750924.568035]  [&lt;ffffffff811bd214&gt;] vfs_write+0xb4/0x1f0
[1750924.568035]  [&lt;ffffffff811bdc49&gt;] SyS_write+0x49/0xa0
[1750924.568035]  [&lt;ffffffff8172f7ed&gt;] system_call_fastpath+0x1a/0x1f
[1750924.568035] Code: 66 2e 0f 1f 84 00 00 00 00 00 31 c0 5d c3 66 2e 0f 1f
84 00 00 00 00 00 66 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb 48 8b 7f 10
&lt;f0&gt; ff 8f 40 01 00 00 74 0e 48 89 df e8 8e f8 06 e1 5b 5d c3 0f
[1750924.568035] RIP  [&lt;ffffffffa0131d51&gt;] qib_mcast_qp_free+0x11/0x50
[ib_qib]
[1750924.568035]  RSP &lt;ffff88007af1dd70&gt;
[1750924.650439] ---[ end trace 73d5d4b3f8ad4851 ]

The fix is to note the qib_mcast_qp that was found.   If none is found, then
return EINVAL indicating the error.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Reported-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.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 09dc9cd6528f5b52bcbd3292a6312e762c85260f upstream.

The code produces the following trace:

[1750924.419007] general protection fault: 0000 [#3] SMP
[1750924.420364] Modules linked in: nfnetlink autofs4 rpcsec_gss_krb5 nfsv4
dcdbas rfcomm bnep bluetooth nfsd auth_rpcgss nfs_acl dm_multipath nfs lockd
scsi_dh sunrpc fscache radeon ttm drm_kms_helper drm serio_raw parport_pc
ppdev i2c_algo_bit lpc_ich ipmi_si ib_mthca ib_qib dca lp parport ib_ipoib
mac_hid ib_cm i3000_edac ib_sa ib_uverbs edac_core ib_umad ib_mad ib_core
ib_addr tg3 ptp dm_mirror dm_region_hash dm_log psmouse pps_core
[1750924.420364] CPU: 1 PID: 8401 Comm: python Tainted: G D
3.13.0-39-generic #66-Ubuntu
[1750924.420364] Hardware name: Dell Computer Corporation PowerEdge
860/0XM089, BIOS A04 07/24/2007
[1750924.420364] task: ffff8800366a9800 ti: ffff88007af1c000 task.ti:
ffff88007af1c000
[1750924.420364] RIP: 0010:[&lt;ffffffffa0131d51&gt;] [&lt;ffffffffa0131d51&gt;]
qib_mcast_qp_free+0x11/0x50 [ib_qib]
[1750924.420364] RSP: 0018:ffff88007af1dd70  EFLAGS: 00010246
[1750924.420364] RAX: 0000000000000001 RBX: ffff88007b822688 RCX:
000000000000000f
[1750924.420364] RDX: ffff88007b822688 RSI: ffff8800366c15a0 RDI:
6764697200000000
[1750924.420364] RBP: ffff88007af1dd78 R08: 0000000000000001 R09:
0000000000000000
[1750924.420364] R10: 0000000000000011 R11: 0000000000000246 R12:
ffff88007baa1d98
[1750924.420364] R13: ffff88003ecab000 R14: ffff88007b822660 R15:
0000000000000000
[1750924.420364] FS:  00007ffff7fd8740(0000) GS:ffff88007fc80000(0000)
knlGS:0000000000000000
[1750924.420364] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[1750924.420364] CR2: 00007ffff597c750 CR3: 000000006860b000 CR4:
00000000000007e0
[1750924.420364] Stack:
[1750924.420364]  ffff88007b822688 ffff88007af1ddf0 ffffffffa0132429
000000007af1de20
[1750924.420364]  ffff88007baa1dc8 ffff88007baa0000 ffff88007af1de70
ffffffffa00cb313
[1750924.420364]  00007fffffffde88 0000000000000000 0000000000000008
ffff88003ecab000
[1750924.420364] Call Trace:
[1750924.420364]  [&lt;ffffffffa0132429&gt;] qib_multicast_detach+0x1e9/0x350
[ib_qib]
[1750924.568035]  [&lt;ffffffffa00cb313&gt;] ? ib_uverbs_modify_qp+0x323/0x3d0
[ib_uverbs]
[1750924.568035]  [&lt;ffffffffa0092d61&gt;] ib_detach_mcast+0x31/0x50 [ib_core]
[1750924.568035]  [&lt;ffffffffa00cc213&gt;] ib_uverbs_detach_mcast+0x93/0x170
[ib_uverbs]
[1750924.568035]  [&lt;ffffffffa00c61f6&gt;] ib_uverbs_write+0xc6/0x2c0 [ib_uverbs]
[1750924.568035]  [&lt;ffffffff81312e68&gt;] ? apparmor_file_permission+0x18/0x20
[1750924.568035]  [&lt;ffffffff812d4cd3&gt;] ? security_file_permission+0x23/0xa0
[1750924.568035]  [&lt;ffffffff811bd214&gt;] vfs_write+0xb4/0x1f0
[1750924.568035]  [&lt;ffffffff811bdc49&gt;] SyS_write+0x49/0xa0
[1750924.568035]  [&lt;ffffffff8172f7ed&gt;] system_call_fastpath+0x1a/0x1f
[1750924.568035] Code: 66 2e 0f 1f 84 00 00 00 00 00 31 c0 5d c3 66 2e 0f 1f
84 00 00 00 00 00 66 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb 48 8b 7f 10
&lt;f0&gt; ff 8f 40 01 00 00 74 0e 48 89 df e8 8e f8 06 e1 5b 5d c3 0f
[1750924.568035] RIP  [&lt;ffffffffa0131d51&gt;] qib_mcast_qp_free+0x11/0x50
[ib_qib]
[1750924.568035]  RSP &lt;ffff88007af1dd70&gt;
[1750924.650439] ---[ end trace 73d5d4b3f8ad4851 ]

The fix is to note the qib_mcast_qp that was found.   If none is found, then
return EINVAL indicating the error.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Reported-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/cm: Fix a recently introduced deadlock</title>
<updated>2016-03-03T23:07:25+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-01-01T12:17:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e97bff5116d8ba6a25848691063d3370b939a4af'/>
<id>e97bff5116d8ba6a25848691063d3370b939a4af</id>
<content type='text'>
commit 4bfdf635c668869c69fd18ece37ec66fb6f38fcf upstream.

ib_send_cm_drep() calls cm_enter_timewait() while holding a spinlock
that can be locked from inside an interrupt handler. Hence do not
enable interrupts inside cm_enter_timewait() if called with interrupts
disabled.

This patch fixes e.g. the following deadlock:
Acked-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;

=================================
[ INFO: inconsistent lock state ]
4.4.0-rc7+ #1 Tainted: G            E
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
swapper/8/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock){?.+...}, at: [&lt;ffffffffa036eec4&gt;] cm_establish+0x
74/0x1b0 [ib_cm]
{HARDIRQ-ON-W} state was registered at:
  [&lt;ffffffff810a3c11&gt;] mark_held_locks+0x71/0x90
  [&lt;ffffffff810a3e87&gt;] trace_hardirqs_on_caller+0xa7/0x1c0
  [&lt;ffffffff810a3fad&gt;] trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8151c40b&gt;] _raw_spin_unlock_irq+0x2b/0x40
  [&lt;ffffffffa036ea8e&gt;] cm_enter_timewait+0xae/0x100 [ib_cm]
  [&lt;ffffffffa036ff76&gt;] ib_send_cm_drep+0xb6/0x190 [ib_cm]
  [&lt;ffffffffa052ed08&gt;] srp_cm_handler+0x128/0x1a0 [ib_srp]
  [&lt;ffffffffa0370340&gt;] cm_process_work+0x20/0xf0 [ib_cm]
  [&lt;ffffffffa0371335&gt;] cm_dreq_handler+0x135/0x2c0 [ib_cm]
  [&lt;ffffffffa03733c5&gt;] cm_work_handler+0x75/0xd0 [ib_cm]
  [&lt;ffffffff8107184d&gt;] process_one_work+0x1bd/0x460
  [&lt;ffffffff81073148&gt;] worker_thread+0x118/0x420
  [&lt;ffffffff81078454&gt;] kthread+0xe4/0x100
  [&lt;ffffffff8151cbbf&gt;] ret_from_fork+0x3f/0x70
irq event stamp: 1672286
hardirqs last  enabled at (1672283): [&lt;ffffffff81408ec0&gt;] poll_idle+0x10/0x80
hardirqs last disabled at (1672284): [&lt;ffffffff8151d304&gt;] common_interrupt+0x84/0x89
softirqs last  enabled at (1672286): [&lt;ffffffff8105b4dc&gt;] _local_bh_enable+0x1c/0x50
softirqs last disabled at (1672285): [&lt;ffffffff8105b697&gt;] irq_enter+0x47/0x70

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

no locks held by swapper/8/0.

stack backtrace:
CPU: 8 PID: 0 Comm: swapper/8 Tainted: G            E   4.4.0-rc7+ #1
Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.0.2 11/17/2014
 ffff88045af5e950 ffff88046e503a88 ffffffff81251c1b 0000000000000007
 0000000000000006 0000000000000003 ffff88045af5ddc0 ffff88046e503ad8
 ffffffff810a32f4 0000000000000000 0000000000000000 0000000000000001
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff81251c1b&gt;] dump_stack+0x4f/0x74
 [&lt;ffffffff810a32f4&gt;] print_usage_bug+0x184/0x190
 [&lt;ffffffff810a36e2&gt;] mark_lock_irq+0xf2/0x290
 [&lt;ffffffff810a3995&gt;] mark_lock+0x115/0x1b0
 [&lt;ffffffff810a3b8c&gt;] mark_irqflags+0x15c/0x170
 [&lt;ffffffff810a4fef&gt;] __lock_acquire+0x1ef/0x560
 [&lt;ffffffff810a53c2&gt;] lock_acquire+0x62/0x80
 [&lt;ffffffff8151bd33&gt;] _raw_spin_lock_irqsave+0x43/0x60
 [&lt;ffffffffa036eec4&gt;] cm_establish+0x74/0x1b0 [ib_cm]
 [&lt;ffffffffa036f031&gt;] ib_cm_notify+0x31/0x100 [ib_cm]
 [&lt;ffffffffa0637f24&gt;] srpt_qp_event+0x54/0xd0 [ib_srpt]
 [&lt;ffffffffa0196052&gt;] mlx4_ib_qp_event+0x72/0xc0 [mlx4_ib]
 [&lt;ffffffffa00775b9&gt;] mlx4_qp_event+0x69/0xd0 [mlx4_core]
 [&lt;ffffffffa006000e&gt;] mlx4_eq_int+0x51e/0xd50 [mlx4_core]
 [&lt;ffffffffa006084f&gt;] mlx4_msi_x_interrupt+0xf/0x20 [mlx4_core]
 [&lt;ffffffff810b67b0&gt;] handle_irq_event_percpu+0x40/0x110
 [&lt;ffffffff810b68bf&gt;] handle_irq_event+0x3f/0x70
 [&lt;ffffffff810ba7f9&gt;] handle_edge_irq+0x79/0x120
 [&lt;ffffffff81007f3d&gt;] handle_irq+0x5d/0x130
 [&lt;ffffffff810071fd&gt;] do_IRQ+0x6d/0x130
 [&lt;ffffffff8151d309&gt;] common_interrupt+0x89/0x89
 &lt;EOI&gt;  [&lt;ffffffff8140895f&gt;] cpuidle_enter_state+0xcf/0x200
 [&lt;ffffffff81408aa2&gt;] cpuidle_enter+0x12/0x20
 [&lt;ffffffff810990d6&gt;] call_cpuidle+0x36/0x60
 [&lt;ffffffff81099163&gt;] cpuidle_idle_call+0x63/0x110
 [&lt;ffffffff8109930a&gt;] cpu_idle_loop+0xfa/0x130
 [&lt;ffffffff8109934e&gt;] cpu_startup_entry+0xe/0x10
 [&lt;ffffffff8103c443&gt;] start_secondary+0x83/0x90

Fixes: commit be4b499323bf ("IB/cm: Do not queue work to a device that's going away")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Erez Shitrit &lt;erezsh@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4bfdf635c668869c69fd18ece37ec66fb6f38fcf upstream.

ib_send_cm_drep() calls cm_enter_timewait() while holding a spinlock
that can be locked from inside an interrupt handler. Hence do not
enable interrupts inside cm_enter_timewait() if called with interrupts
disabled.

This patch fixes e.g. the following deadlock:
Acked-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;

=================================
[ INFO: inconsistent lock state ]
4.4.0-rc7+ #1 Tainted: G            E
---------------------------------
inconsistent {HARDIRQ-ON-W} -&gt; {IN-HARDIRQ-W} usage.
swapper/8/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock){?.+...}, at: [&lt;ffffffffa036eec4&gt;] cm_establish+0x
74/0x1b0 [ib_cm]
{HARDIRQ-ON-W} state was registered at:
  [&lt;ffffffff810a3c11&gt;] mark_held_locks+0x71/0x90
  [&lt;ffffffff810a3e87&gt;] trace_hardirqs_on_caller+0xa7/0x1c0
  [&lt;ffffffff810a3fad&gt;] trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8151c40b&gt;] _raw_spin_unlock_irq+0x2b/0x40
  [&lt;ffffffffa036ea8e&gt;] cm_enter_timewait+0xae/0x100 [ib_cm]
  [&lt;ffffffffa036ff76&gt;] ib_send_cm_drep+0xb6/0x190 [ib_cm]
  [&lt;ffffffffa052ed08&gt;] srp_cm_handler+0x128/0x1a0 [ib_srp]
  [&lt;ffffffffa0370340&gt;] cm_process_work+0x20/0xf0 [ib_cm]
  [&lt;ffffffffa0371335&gt;] cm_dreq_handler+0x135/0x2c0 [ib_cm]
  [&lt;ffffffffa03733c5&gt;] cm_work_handler+0x75/0xd0 [ib_cm]
  [&lt;ffffffff8107184d&gt;] process_one_work+0x1bd/0x460
  [&lt;ffffffff81073148&gt;] worker_thread+0x118/0x420
  [&lt;ffffffff81078454&gt;] kthread+0xe4/0x100
  [&lt;ffffffff8151cbbf&gt;] ret_from_fork+0x3f/0x70
irq event stamp: 1672286
hardirqs last  enabled at (1672283): [&lt;ffffffff81408ec0&gt;] poll_idle+0x10/0x80
hardirqs last disabled at (1672284): [&lt;ffffffff8151d304&gt;] common_interrupt+0x84/0x89
softirqs last  enabled at (1672286): [&lt;ffffffff8105b4dc&gt;] _local_bh_enable+0x1c/0x50
softirqs last disabled at (1672285): [&lt;ffffffff8105b697&gt;] irq_enter+0x47/0x70

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;cm_id_priv-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

no locks held by swapper/8/0.

stack backtrace:
CPU: 8 PID: 0 Comm: swapper/8 Tainted: G            E   4.4.0-rc7+ #1
Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.0.2 11/17/2014
 ffff88045af5e950 ffff88046e503a88 ffffffff81251c1b 0000000000000007
 0000000000000006 0000000000000003 ffff88045af5ddc0 ffff88046e503ad8
 ffffffff810a32f4 0000000000000000 0000000000000000 0000000000000001
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff81251c1b&gt;] dump_stack+0x4f/0x74
 [&lt;ffffffff810a32f4&gt;] print_usage_bug+0x184/0x190
 [&lt;ffffffff810a36e2&gt;] mark_lock_irq+0xf2/0x290
 [&lt;ffffffff810a3995&gt;] mark_lock+0x115/0x1b0
 [&lt;ffffffff810a3b8c&gt;] mark_irqflags+0x15c/0x170
 [&lt;ffffffff810a4fef&gt;] __lock_acquire+0x1ef/0x560
 [&lt;ffffffff810a53c2&gt;] lock_acquire+0x62/0x80
 [&lt;ffffffff8151bd33&gt;] _raw_spin_lock_irqsave+0x43/0x60
 [&lt;ffffffffa036eec4&gt;] cm_establish+0x74/0x1b0 [ib_cm]
 [&lt;ffffffffa036f031&gt;] ib_cm_notify+0x31/0x100 [ib_cm]
 [&lt;ffffffffa0637f24&gt;] srpt_qp_event+0x54/0xd0 [ib_srpt]
 [&lt;ffffffffa0196052&gt;] mlx4_ib_qp_event+0x72/0xc0 [mlx4_ib]
 [&lt;ffffffffa00775b9&gt;] mlx4_qp_event+0x69/0xd0 [mlx4_core]
 [&lt;ffffffffa006000e&gt;] mlx4_eq_int+0x51e/0xd50 [mlx4_core]
 [&lt;ffffffffa006084f&gt;] mlx4_msi_x_interrupt+0xf/0x20 [mlx4_core]
 [&lt;ffffffff810b67b0&gt;] handle_irq_event_percpu+0x40/0x110
 [&lt;ffffffff810b68bf&gt;] handle_irq_event+0x3f/0x70
 [&lt;ffffffff810ba7f9&gt;] handle_edge_irq+0x79/0x120
 [&lt;ffffffff81007f3d&gt;] handle_irq+0x5d/0x130
 [&lt;ffffffff810071fd&gt;] do_IRQ+0x6d/0x130
 [&lt;ffffffff8151d309&gt;] common_interrupt+0x89/0x89
 &lt;EOI&gt;  [&lt;ffffffff8140895f&gt;] cpuidle_enter_state+0xcf/0x200
 [&lt;ffffffff81408aa2&gt;] cpuidle_enter+0x12/0x20
 [&lt;ffffffff810990d6&gt;] call_cpuidle+0x36/0x60
 [&lt;ffffffff81099163&gt;] cpuidle_idle_call+0x63/0x110
 [&lt;ffffffff8109930a&gt;] cpu_idle_loop+0xfa/0x130
 [&lt;ffffffff8109934e&gt;] cpu_startup_entry+0xe/0x10
 [&lt;ffffffff8103c443&gt;] start_secondary+0x83/0x90

Fixes: commit be4b499323bf ("IB/cm: Do not queue work to a device that's going away")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iw_cxgb3: Fix incorrectly returning error on success</title>
<updated>2016-03-03T23:07:10+00:00</updated>
<author>
<name>Hariprasad S</name>
<email>hariprasad@chelsio.com</email>
</author>
<published>2015-12-11T08:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=64fb3e29bf47e5db029b81fc99ac40f6cd2620ac'/>
<id>64fb3e29bf47e5db029b81fc99ac40f6cd2620ac</id>
<content type='text'>
commit 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 upstream.

The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
[a pox on developers and maintainers who do not cc: stable for bug fixes like this - gregkh]
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 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 upstream.

The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
[a pox on developers and maintainers who do not cc: stable for bug fixes like this - gregkh]
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net/mlx5_core: Fix trimming down IRQ number</title>
<updated>2016-01-31T19:29:01+00:00</updated>
<author>
<name>Doron Tsur</name>
<email>doront@mellanox.com</email>
</author>
<published>2016-01-17T09:25:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9ef3ceb4e78d12e1f1a81f6ebb88986e6344c7c8'/>
<id>9ef3ceb4e78d12e1f1a81f6ebb88986e6344c7c8</id>
<content type='text'>
[ Upstream commit 0b6e26ce89391327d955a756a7823272238eb867 ]

With several ConnectX-4 cards installed on a server, one may receive
irqn &gt; 255 from the kernel API, which we mistakenly trim to 8bit.

This causes EQ creation failure with the following stack trace:
[&lt;ffffffff812a11f4&gt;] dump_stack+0x48/0x64
[&lt;ffffffff810ace21&gt;] __setup_irq+0x3a1/0x4f0
[&lt;ffffffff810ad7e0&gt;] request_threaded_irq+0x120/0x180
[&lt;ffffffffa0923660&gt;] ? mlx5_eq_int+0x450/0x450 [mlx5_core]
[&lt;ffffffffa0922f64&gt;] mlx5_create_map_eq+0x1e4/0x2b0 [mlx5_core]
[&lt;ffffffffa091de01&gt;] alloc_comp_eqs+0xb1/0x180 [mlx5_core]
[&lt;ffffffffa091ea99&gt;] mlx5_dev_init+0x5e9/0x6e0 [mlx5_core]
[&lt;ffffffffa091ec29&gt;] init_one+0x99/0x1c0 [mlx5_core]
[&lt;ffffffff812e2afc&gt;] local_pci_probe+0x4c/0xa0

Fixing it by changing of the irqn type from u8 to unsigned int to
support values &gt; 255

Fixes: 61d0e73e0a5a ('net/mlx5_core: Use the the real irqn in eq-&gt;irqn')
Reported-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Doron Tsur &lt;doront@mellanox.com&gt;
Signed-off-by: Matan Barak &lt;matanb@mellanox.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0b6e26ce89391327d955a756a7823272238eb867 ]

With several ConnectX-4 cards installed on a server, one may receive
irqn &gt; 255 from the kernel API, which we mistakenly trim to 8bit.

This causes EQ creation failure with the following stack trace:
[&lt;ffffffff812a11f4&gt;] dump_stack+0x48/0x64
[&lt;ffffffff810ace21&gt;] __setup_irq+0x3a1/0x4f0
[&lt;ffffffff810ad7e0&gt;] request_threaded_irq+0x120/0x180
[&lt;ffffffffa0923660&gt;] ? mlx5_eq_int+0x450/0x450 [mlx5_core]
[&lt;ffffffffa0922f64&gt;] mlx5_create_map_eq+0x1e4/0x2b0 [mlx5_core]
[&lt;ffffffffa091de01&gt;] alloc_comp_eqs+0xb1/0x180 [mlx5_core]
[&lt;ffffffffa091ea99&gt;] mlx5_dev_init+0x5e9/0x6e0 [mlx5_core]
[&lt;ffffffffa091ec29&gt;] init_one+0x99/0x1c0 [mlx5_core]
[&lt;ffffffff812e2afc&gt;] local_pci_probe+0x4c/0xa0

Fixing it by changing of the irqn type from u8 to unsigned int to
support values &gt; 255

Fixes: 61d0e73e0a5a ('net/mlx5_core: Use the the real irqn in eq-&gt;irqn')
Reported-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Doron Tsur &lt;doront@mellanox.com&gt;
Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/ocrdma: Depend on async link events from CNA</title>
<updated>2015-12-28T16:45:54+00:00</updated>
<author>
<name>Devesh Sharma</name>
<email>devesh.sharma@avagotech.com</email>
</author>
<published>2015-12-24T18:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=10a214dc996236e6547b84fb5ca007316b30c2e6'/>
<id>10a214dc996236e6547b84fb5ca007316b30c2e6</id>
<content type='text'>
Recently Dough Ledford reported a deadlock happening
between ocrdma-load sequence and NetworkManager service
issuing "open" on be2net interface.

The deadlock happens when any be2net hook (e.g. open/close) is called
in parallel to insmod ocrdma.ko.

A. be2net is sending administrative open/close event to ocrdma holding
   device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net.
   So sequence of locks is rtnl_lock---&gt; device_list lock

B.  When new ocrdma roce device gets registered, infiniband stack now
    takes rtnl_lock in ib_register_device() in GID initialization routines.
    So sequence of locks in this path is device_list lock ---&gt; rtnl_lock.

This improper locking sequence causes deadlock.

With this patch we stop using administrative open and close events
injected by be2net driver. These events were used to dispatch PORT_ACTIVE
and PORT_ERROR events to the IB-stack. This patch implements a logic
to receive async-link-events generated from CNA whenever link-state-change
is detected. Now on, these async-events will be used to dispatch
PORT_ACTIVE and PORT_ERROR events to IB-stack.

Depending on async-events from CNA removes the need to hold device-list-mutex
and thus breaks the busy-wait scenario.

Reported-by: Doug Ledford &lt;dledford@redhat.com&gt;
CC: Sathya Perla &lt;sathya.perla@avagotech.com&gt;
Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: Selvin Xavier &lt;selvin.xavier@avagotech.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently Dough Ledford reported a deadlock happening
between ocrdma-load sequence and NetworkManager service
issuing "open" on be2net interface.

The deadlock happens when any be2net hook (e.g. open/close) is called
in parallel to insmod ocrdma.ko.

A. be2net is sending administrative open/close event to ocrdma holding
   device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net.
   So sequence of locks is rtnl_lock---&gt; device_list lock

B.  When new ocrdma roce device gets registered, infiniband stack now
    takes rtnl_lock in ib_register_device() in GID initialization routines.
    So sequence of locks in this path is device_list lock ---&gt; rtnl_lock.

This improper locking sequence causes deadlock.

With this patch we stop using administrative open and close events
injected by be2net driver. These events were used to dispatch PORT_ACTIVE
and PORT_ERROR events to the IB-stack. This patch implements a logic
to receive async-link-events generated from CNA whenever link-state-change
is detected. Now on, these async-events will be used to dispatch
PORT_ACTIVE and PORT_ERROR events to IB-stack.

Depending on async-events from CNA removes the need to hold device-list-mutex
and thus breaks the busy-wait scenario.

Reported-by: Doug Ledford &lt;dledford@redhat.com&gt;
CC: Sathya Perla &lt;sathya.perla@avagotech.com&gt;
Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: Selvin Xavier &lt;selvin.xavier@avagotech.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/ocrdma: Dispatch only port event when port state changes</title>
<updated>2015-12-28T16:45:54+00:00</updated>
<author>
<name>Devesh Sharma</name>
<email>devesh.sharma@avagotech.com</email>
</author>
<published>2015-12-24T18:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=36ac0db0dbf7081afe4137d444ef85614213b8eb'/>
<id>36ac0db0dbf7081afe4137d444ef85614213b8eb</id>
<content type='text'>
Dispatch only port event to IB stack when port state changes.
Don't explicitly modify qps to error. Let application listen to
port events on async event queue or let QP fail with retry-exceeded
completion error.

Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dispatch only port event to IB stack when port state changes.
Don't explicitly modify qps to error. Let application listen to
port events on async event queue or let QP fail with retry-exceeded
completion error.

Signed-off-by: Padmanabh Ratnakar &lt;padmanabh.ratnakar@avagotech.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/ocrdma: Fix vlan-id assignment in qp parameters</title>
<updated>2015-12-28T16:45:54+00:00</updated>
<author>
<name>Devesh Sharma</name>
<email>devesh.sharma@avagotech.com</email>
</author>
<published>2015-12-24T18:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c6002d5602ab36c19ef4fe0e20ecfa28aaabf028'/>
<id>c6002d5602ab36c19ef4fe0e20ecfa28aaabf028</id>
<content type='text'>
vlan-id is wrongly getting as 0 when PFC is enabled.
Set vlan-id configured by user in QP parameters.
In case vlan interface is not used, flash a warning to
user to configure vlan and assign vlan-id as 0 in qp params.

Fixes: dbf727de7440 ('IB/core: Use GID table in AH creation and dmac resolution')
Cc: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vlan-id is wrongly getting as 0 when PFC is enabled.
Set vlan-id configured by user in QP parameters.
In case vlan interface is not used, flash a warning to
user to configure vlan and assign vlan-id as 0 in qp params.

Fixes: dbf727de7440 ('IB/core: Use GID table in AH creation and dmac resolution')
Cc: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Devesh Sharma &lt;devesh.sharma@avagotech.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
