<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/sw, 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>IB/rxe: Fix a memory leak in rxe_qp_cleanup()</title>
<updated>2017-01-09T07:21:58Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2016-12-15T16:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b3721aff59b00a3ee7ba659db61129a46dad8ef'/>
<id>urn:sha1:7b3721aff59b00a3ee7ba659db61129a46dad8ef</id>
<content type='text'>
commit e259934d4df7f99f2a5c2c4f074f6a55bd4b1722 upstream.

A socket is associated with every QP by the rxe driver but sock_release()
is never called. Add a call to sock_release() in rxe_qp_cleanup().

Fixes: commit 8700e3e7c48A5 ("Add Soft RoCE driver")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Moni Shoua &lt;monis@mellanox.com&gt;
Cc: Kamal Heib &lt;kamalh@mellanox.com&gt;
Cc: Amir Vadai &lt;amirv@mellanox.com&gt;
Cc: Haggai Eran &lt;haggaie@mellanox.com&gt;
Reviewed-by: Moni Shoua &lt;monis@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/rxe: Clear queue buffer when modifying QP to reset</title>
<updated>2016-11-26T08:56:57Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-11-16T08:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc9275365065937944ff7cdc494af8147a7e9443'/>
<id>urn:sha1:fc9275365065937944ff7cdc494af8147a7e9443</id>
<content type='text'>
commit aa75b07b478a774b1432e2df1be5cd8ae834de0f upstream.

RXE resets the send-q only once in rxe_qp_init_req() when
QP is created, but when the QP is reused after QP reset, the send-q
holds previous garbage data.

This garbage data wrongly fails CQEs that otherwise
should have completed successfully.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@mellanox.com&gt;
Reviewed-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&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/rxe: Fix handling of erroneous WR</title>
<updated>2016-11-26T08:56:57Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-11-16T08:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c87b4a8f6d5394990c73af07d56fcea748b1400'/>
<id>urn:sha1:3c87b4a8f6d5394990c73af07d56fcea748b1400</id>
<content type='text'>
commit 002e062e13db10973adb8302f231e48b477c7ccf upstream.

To correctly handle a erroneous WR this fix does the following
1. Make sure the bad WQE causes a user completion event.
2. Call rxe_completer to handle the erred WQE.

Before the fix, when rxe_requester found a bad WQE, it changed its
status to IB_WC_LOC_PROT_ERR and exit with 0 for non RC QPs.

If this was the 1st WQE then there would be no ACK to invoke the
completer and this bad WQE would be stuck in the QP's send-q.

On top of that the requester exiting with 0 caused rxe_do_task to
endlessly invoke rxe_requester, resulting in a soft-lockup attached
below.

In case the WQE was not the 1st and rxe_completer did get a chance to
handle the bad WQE, it did not cause a complete event since the WQE's
IB_SEND_SIGNALED flag was not set.

Setting WQE status to IB_SEND_SIGNALED is subject to IBA spec
version 1.2.1, section 10.7.3.1 Signaled Completions.

NMI watchdog: BUG: soft lockup - CPU#7 stuck for 22s!
[&lt;ffffffffa0590145&gt;] ? rxe_pool_get_index+0x35/0xb0 [rdma_rxe]
[&lt;ffffffffa05952ec&gt;] lookup_mem+0x3c/0xc0 [rdma_rxe]
[&lt;ffffffffa0595534&gt;] copy_data+0x1c4/0x230 [rdma_rxe]
[&lt;ffffffffa058c180&gt;] rxe_requester+0x9d0/0x1100 [rdma_rxe]
[&lt;ffffffff8158e98a&gt;] ? kfree_skbmem+0x5a/0x60
[&lt;ffffffffa05962c9&gt;] rxe_do_task+0x89/0xf0 [rdma_rxe]
[&lt;ffffffffa05963e2&gt;] rxe_run_task+0x12/0x30 [rdma_rxe]
[&lt;ffffffffa059110a&gt;] rxe_post_send+0x41a/0x550 [rdma_rxe]
[&lt;ffffffff811ef922&gt;] ? __kmalloc+0x182/0x200
[&lt;ffffffff816ba512&gt;] ? down_read+0x12/0x40
[&lt;ffffffffa054bd32&gt;] ib_uverbs_post_send+0x532/0x540 [ib_uverbs]
[&lt;ffffffff815f8722&gt;] ? tcp_sendmsg+0x402/0xb80
[&lt;ffffffffa05453dc&gt;] ib_uverbs_write+0x18c/0x3f0 [ib_uverbs]
[&lt;ffffffff81623c2e&gt;] ? inet_recvmsg+0x7e/0xb0
[&lt;ffffffff8158764d&gt;] ? sock_recvmsg+0x3d/0x50
[&lt;ffffffff81215b87&gt;] __vfs_write+0x37/0x140
[&lt;ffffffff81216892&gt;] vfs_write+0xb2/0x1b0
[&lt;ffffffff81217ce5&gt;] SyS_write+0x55/0xc0
[&lt;ffffffff816bc672&gt;] entry_SYSCALL_64_fastpath+0x1a/0xa

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@mellanox.com&gt;
Reviewed-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&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/rxe: Fix kernel panic in UDP tunnel with GRO and RX checksum</title>
<updated>2016-11-26T08:56:57Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-11-16T08:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4605a0e9605540a58aaba32022c30e697a4a93f'/>
<id>urn:sha1:c4605a0e9605540a58aaba32022c30e697a4a93f</id>
<content type='text'>
commit 1454ca3a97e147bb91e98b087446c39cf6692a48 upstream.

Missing initialization of udp_tunnel_sock_cfg causes to following
kernel panic, while kernel tries to execute gro_receive().

While being there, we converted udp_port_cfg to use the same
initialization scheme as udp_tunnel_sock_cfg.

------------[ cut here ]------------
kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
BUG: unable to handle kernel paging request at ffffffffa0588c50
IP: [&lt;ffffffffa0588c50&gt;] __this_module+0x50/0xffffffffffff8400 [ib_rxe]
PGD 1c09067 PUD 1c0a063 PMD bb394067 PTE 80000000ad5e8163
Oops: 0011 [#1] SMP
Modules linked in: ib_rxe ip6_udp_tunnel udp_tunnel
CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.7.0-rc3+ #2
Hardware name: Red Hat KVM, BIOS Bochs 01/01/2011
task: ffff880235e4e680 ti: ffff880235e68000 task.ti: ffff880235e68000
RIP: 0010:[&lt;ffffffffa0588c50&gt;]
[&lt;ffffffffa0588c50&gt;] __this_module+0x50/0xffffffffffff8400 [ib_rxe]
RSP: 0018:ffff880237343c80  EFLAGS: 00010282
RAX: 00000000dffe482d RBX: ffff8800ae330900 RCX: 000000002001b712
RDX: ffff8800ae330900 RSI: ffff8800ae102578 RDI: ffff880235589c00
RBP: ffff880237343cb0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800ae33e262
R13: ffff880235589c00 R14: 0000000000000014 R15: ffff8800ae102578
FS:  0000000000000000(0000) GS:ffff880237340000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffa0588c50 CR3: 0000000001c06000 CR4: 00000000000006e0
Stack:
ffffffff8160860e ffff8800ae330900 ffff8800ae102578 0000000000000014
000000000000004e ffff8800ae102578 ffff880237343ce0 ffffffff816088fb
0000000000000000 ffff8800ae330900 0000000000000000 00000000ffad0000
Call Trace:
&lt;IRQ&gt;
[&lt;ffffffff8160860e&gt;] ? udp_gro_receive+0xde/0x130
[&lt;ffffffff816088fb&gt;] udp4_gro_receive+0x10b/0x2d0
[&lt;ffffffff81611373&gt;] inet_gro_receive+0x1d3/0x270
[&lt;ffffffff81594e29&gt;] dev_gro_receive+0x269/0x3b0
[&lt;ffffffff81595188&gt;] napi_gro_receive+0x38/0x120
[&lt;ffffffffa011caee&gt;] mlx5e_handle_rx_cqe+0x27e/0x340 [mlx5_core]
[&lt;ffffffffa011d076&gt;] mlx5e_poll_rx_cq+0x66/0x6d0 [mlx5_core]
[&lt;ffffffffa011d7ae&gt;] mlx5e_napi_poll+0x8e/0x400 [mlx5_core]
[&lt;ffffffff815949a0&gt;] net_rx_action+0x160/0x380
[&lt;ffffffff816a9197&gt;] __do_softirq+0xd7/0x2c5
[&lt;ffffffff81085c35&gt;] irq_exit+0xf5/0x100
[&lt;ffffffff816a8f16&gt;] do_IRQ+0x56/0xd0
[&lt;ffffffff816a6dcc&gt;] common_interrupt+0x8c/0x8c
&lt;EOI&gt;
[&lt;ffffffff81061f96&gt;] ? native_safe_halt+0x6/0x10
[&lt;ffffffff81037ade&gt;] default_idle+0x1e/0xd0
[&lt;ffffffff8103828f&gt;] arch_cpu_idle+0xf/0x20
[&lt;ffffffff810c37dc&gt;] default_idle_call+0x3c/0x50
[&lt;ffffffff810c3b13&gt;] cpu_startup_entry+0x323/0x3c0
[&lt;ffffffff81050d8c&gt;] start_secondary+0x15c/0x1a0
RIP  [&lt;ffffffffa0588c50&gt;] __this_module+0x50/0xffffffffffff8400 [ib_rxe]
RSP &lt;ffff880237343c80&gt;
CR2: ffffffffa0588c50
---[ end trace 489ee31fa7614ac5 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Fatal exception in interrupt
------------[ cut here ]------------

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@mellanox.com&gt;
Reviewed-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&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/rxe: Update qp state for user query</title>
<updated>2016-11-26T08:56:57Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-11-16T08:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04d016249998e3600233e2b3057e1a6e56e6e433'/>
<id>urn:sha1:04d016249998e3600233e2b3057e1a6e56e6e433</id>
<content type='text'>
commit 6d931308f55faaef3f30bd0346c47f99528b229d upstream.

The method rxe_qp_error() transitions QP to error state
and make sure the QP is drained. It did not though update
the QP state for user's query.

This patch fixes this.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@mellanox.com&gt;
Reviewed-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&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/rdmavt: rdmavt can handle non aligned page maps</title>
<updated>2016-11-26T08:56:54Z</updated>
<author>
<name>Dennis Dalessandro</name>
</author>
<published>2016-10-10T13:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06eac15f11e014e471f1486fa47817d3a3697b4d'/>
<id>urn:sha1:06eac15f11e014e471f1486fa47817d3a3697b4d</id>
<content type='text'>
commit e1fafdcbe0e3e769c6a83317dd845bc99b4fe61d upstream.

The initial code for rdmavt carried with it a restriction that was a
vestige from the qib driver, that to dma map a page it had to be less
than a page size. This is not the case on modern hardware, both qib and
hfi1 will be just fine with unaligned map requests.

This fixes a 4.8 regression where by an IPoIB transfer of &gt; PAGE_SIZE
will hang because the dma map page call always fails. This was
introduced after commit 5faba5469522 ("IB/ipoib: Report SG feature
regardless of HW UD CSUM capability") added the capability to use SG by
default. Rather than override this, the HW supports it, so allow SG.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@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>
</entry>
<entry>
<title>IB/rdmavt: Correct sparse annotation</title>
<updated>2016-10-31T11:02:11Z</updated>
<author>
<name>Mike Marciniszyn</name>
</author>
<published>2016-09-06T11:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17338680dc2f710b483581ad9395f76367ac90de'/>
<id>urn:sha1:17338680dc2f710b483581ad9395f76367ac90de</id>
<content type='text'>
commit eefa1d8961584c5b76afded94960ca4344bc638b upstream.

The __must_hold() is sufficent to correct the sparse
context imbalance inside a function.

Per Documentation/sparse.txt:
__must_hold - The specified lock is held on function entry and exit.

Fixes: Commit c0a67f6ba356 ("IB/rdmavt: Annotate rvt_reset_qp()")
Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@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>
</entry>
<entry>
<title>IB/rdmavt: Don't vfree a kzalloc'ed memory region</title>
<updated>2016-09-16T18:14:23Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2016-09-09T07:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4618d40eb3dc1a6d1f55f7150ea25bb23ab410a'/>
<id>urn:sha1:e4618d40eb3dc1a6d1f55f7150ea25bb23ab410a</id>
<content type='text'>
The userspace memory region 'mr' is allocated with kzalloc in
__rvt_alloc_mr  however it is incorrectly being freed with vfree in
__rvt_free_mr. Fix this by using kfree to free it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Acked-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/rxe: Fix kmem_cache leak</title>
<updated>2016-09-16T18:14:08Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-09-07T11:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1cc72cb6ff95cbe02ed747866576dccab4a5911'/>
<id>urn:sha1:c1cc72cb6ff95cbe02ed747866576dccab4a5911</id>
<content type='text'>
Decrement qp reference when handling error path
in completer to prevent kmem_cache leak.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@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/rxe: Fix race condition between requester and completer</title>
<updated>2016-09-16T18:14:08Z</updated>
<author>
<name>Yonatan Cohen</name>
</author>
<published>2016-09-07T11:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3050b99850247695cb07a5c15265afcc08bcf400'/>
<id>urn:sha1:3050b99850247695cb07a5c15265afcc08bcf400</id>
<content type='text'>
rxe_requester() is sending a pkt with rxe_xmit_packet() and
then calls rxe_update() to update the wqe and qp's psn values.
But sometimes the response is received before the requester
had time to update the wqe in which case the completer
acts on errornous wqe values.
This fix updates the wqe and qp before actually sending
the request and rolls back when xmit fails.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen &lt;yonatanc@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>
