<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/infiniband, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-06-20T19:01:35+00:00</updated>
<entry>
<title>RDMA/cma: Do not query GID during QP state transition to RTR</title>
<updated>2018-06-20T19:01:35+00:00</updated>
<author>
<name>Parav Pandit</name>
<email>parav@mellanox.com</email>
</author>
<published>2018-05-02T10:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da3c24015fa92476d5bd3343c8c0f56b4e928021'/>
<id>urn:sha1:da3c24015fa92476d5bd3343c8c0f56b4e928021</id>
<content type='text'>
[ Upstream commit 9aa169213d1166d30ae357a44abbeae93459339d ]

When commit [1] was added, SGID was queried to derive the SMAC address.
Then, later on during a refactor [2], SMAC was no longer needed. However,
the now useless GID query remained.  Then during additional code changes
later on, the GID query was being done in such a way that it caused iWARP
queries to start breaking.  Remove the useless GID query and resolve the
iWARP breakage at the same time.

This is discussed in [3].

[1] commit dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures")
[2] commit 5c266b2304fb ("IB/cm: Remove the usage of smac and vid of qp_attr and cm_av")
[3] https://www.spinics.net/lists/linux-rdma/msg63951.html

Suggested-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Signed-off-by: Parav Pandit &lt;parav@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/mlx4: Fix integer overflow when calculating optimal MTT size</title>
<updated>2018-06-20T19:01:35+00:00</updated>
<author>
<name>Jack Morgenstein</name>
<email>jackm@dev.mellanox.co.il</email>
</author>
<published>2018-05-02T10:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=000fcf06055b9fc59ad005a4919a06d2277afd50'/>
<id>urn:sha1:000fcf06055b9fc59ad005a4919a06d2277afd50</id>
<content type='text'>
[ Upstream commit b03bcde962606d2ee59a4e9dd470db9ad53c5418 ]

When the kernel was compiled using the UBSAN option,
we saw the following stack trace:

[ 1184.827917] UBSAN: Undefined behaviour in drivers/infiniband/hw/mlx4/mr.c:349:27
[ 1184.828114] signed integer overflow:
[ 1184.828247] -2147483648 - 1 cannot be represented in type 'int'

The problem was caused by calling round_up in procedure
mlx4_ib_umem_calc_optimal_mtt_size (on line 349, as noted in the stack
trace) with the second parameter (1 &lt;&lt; block_shift) (which is an int).
The second parameter should have been (1ULL &lt;&lt; block_shift) (which
is an unsigned long long).

(1 &lt;&lt; block_shift) is treated by the compiler as an int (because 1 is
an integer).

Now, local variable block_shift is initialized to 31.
If block_shift is 31, 1 &lt;&lt; block_shift is 1 &lt;&lt; 31 = 0x80000000=-214748368.
This is the most negative int value.

Inside the round_up macro, there is a cast applied to ((1 &lt;&lt; 31) - 1).
However, this cast is applied AFTER ((1 &lt;&lt; 31) - 1) is calculated.
Since (1 &lt;&lt; 31) is treated as an int, we get the negative overflow
identified by UBSAN in the process of calculating ((1 &lt;&lt; 31) - 1).

The fix is to change (1 &lt;&lt; block_shift) to (1ULL &lt;&lt; block_shift) on
line 349.

Fixes: 9901abf58368 ("IB/mlx4: Use optimal numbers of MTT entries")
Signed-off-by: Jack Morgenstein &lt;jackm@dev.mellanox.co.il&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: Fix memory leak in exception path in get_irq_affinity()</title>
<updated>2018-06-20T19:01:35+00:00</updated>
<author>
<name>Sebastian Sanchez</name>
<email>sebastian.sanchez@intel.com</email>
</author>
<published>2018-05-01T12:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d047fef7eb1321939af74e10a5cb603e20cd19f6'/>
<id>urn:sha1:d047fef7eb1321939af74e10a5cb603e20cd19f6</id>
<content type='text'>
[ Upstream commit 59482a14918b282ca2a98f38c69da5ebeb1107d2 ]

When IRQ affinity is set and the interrupt type is unknown, a cpu
mask allocated within the function is never freed. Fix this memory
leak by allocating memory within the scope where it is used.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Reviewed-by: Michael J. Ruhl &lt;michael.j.ruhl@intel.com&gt;
Signed-off-by: Sebastian Sanchez &lt;sebastian.sanchez@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: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure</title>
<updated>2018-06-20T19:01:35+00:00</updated>
<author>
<name>Sebastian Sanchez</name>
<email>sebastian.sanchez@intel.com</email>
</author>
<published>2018-05-01T12:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3566fe0f196ea7d1d189a0437e7b0a7c3eed05e3'/>
<id>urn:sha1:3566fe0f196ea7d1d189a0437e7b0a7c3eed05e3</id>
<content type='text'>
[ Upstream commit e9777ad4399c26c70318c4945f94efac2ed95391 ]

When allocating device data, if there's an allocation failure, the
already allocated memory won't be freed such as per-cpu counters.

Fix memory leaks in exception path by creating a common reentrant
clean up function hfi1_clean_devdata() to be used at driver unload
time and device data allocation failure.

To accomplish this, free_platform_config() and clean_up_i2c() are
changed to be reentrant to remove dependencies when they are called
in different order. This helps avoid NULL pointer dereferences
introduced by this patch if those two functions weren't reentrant.

In addition, set dd-&gt;int_counter, dd-&gt;rcv_limit,
dd-&gt;send_schedule and dd-&gt;tx_opstats to NULL after they're freed in
hfi1_clean_devdata(), so that hfi1_clean_devdata() is fully reentrant.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Reviewed-by: Michael J. Ruhl &lt;michael.j.ruhl@intel.com&gt;
Signed-off-by: Sebastian Sanchez &lt;sebastian.sanchez@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: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/hfi1 Use correct type for num_user_context</title>
<updated>2018-06-20T19:01:35+00:00</updated>
<author>
<name>Michael J. Ruhl</name>
<email>michael.j.ruhl@intel.com</email>
</author>
<published>2018-05-01T12:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eca2f76b1d13c2dedc24e3b405389018866ed76b'/>
<id>urn:sha1:eca2f76b1d13c2dedc24e3b405389018866ed76b</id>
<content type='text'>
[ Upstream commit 5da9e742be44d9b7c68b1bf6e1aaf46a1aa7a52b ]

The module parameter num_user_context is defined as 'int' and
defaults to -1.  The module_param_named() says that it is uint.

Correct module_param_named() type information and update the modinfo
text to reflect the default value.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Michael J. Ruhl &lt;michael.j.ruhl@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: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>IB/core: Make ib_mad_client_id atomic</title>
<updated>2018-06-20T19:01:31+00:00</updated>
<author>
<name>Håkon Bugge</name>
<email>haakon.bugge@oracle.com</email>
</author>
<published>2018-04-18T14:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c8f440664dac4a8c2727445d3c7d65c14c9e0e67'/>
<id>urn:sha1:c8f440664dac4a8c2727445d3c7d65c14c9e0e67</id>
<content type='text'>
[ Upstream commit db82476f37413eaeff5f836a9d8b022d6544accf ]

Currently, the kernel protects access to the agent ID allocator on a per
port basis using a spinlock, so it is impossible for two apps/threads on
the same port to get the same TID, but it is entirely possible for two
threads on different ports to end up with the same TID.

As this can be confusing (regardless of it being legal according to the
IB Spec 1.3, C13-18.1.1, in section 13.4.6.4 - TransactionID usage),
and as the rdma-core user space API for /dev/umad devices implies unique
TIDs even across ports, make the TID an atomic type so that no two
allocations, regardless of port number, will be the same.

Signed-off-by: Håkon Bugge &lt;haakon.bugge@oracle.com&gt;
Reviewed-by: Jack Morgenstein &lt;jackm@dev.mellanox.co.il&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Zhu Yanjun &lt;yanjun.zhu@oracle.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hns: Submit bad wr</title>
<updated>2018-06-20T19:01:31+00:00</updated>
<author>
<name>oulijun</name>
<email>oulijun@huawei.com</email>
</author>
<published>2018-04-26T06:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e0d8d5f26052a19db9065609f4a456d2bd34a1f1'/>
<id>urn:sha1:e0d8d5f26052a19db9065609f4a456d2bd34a1f1</id>
<content type='text'>
[ Upstream commit 137ae3208416278aabef3b71e0ea1052940ca362 ]

When generated bad work reqeust, it needs to
report to user. This patch mainly fixes it.

Signed-off-by: Lijun Ou &lt;oulijun@huawei.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hns: Fix the qp context state diagram</title>
<updated>2018-06-20T19:01:30+00:00</updated>
<author>
<name>oulijun</name>
<email>oulijun@huawei.com</email>
</author>
<published>2018-04-26T06:46:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9c774acd2954f47fc4b003c8881c36eddf275ab'/>
<id>urn:sha1:f9c774acd2954f47fc4b003c8881c36eddf275ab</id>
<content type='text'>
[ Upstream commit 6e1a70943cecdca9bb13b601b1a9772a7bdcc2c3 ]

According to RoCE protocol, it is possible to
transition from error to error state for modifying
qp in hip08. This patch fix it.

Signed-off-by: Lijun Ou &lt;oulijun@huawei.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hns: Intercept illegal RDMA operation when use inline data</title>
<updated>2018-06-20T19:01:30+00:00</updated>
<author>
<name>oulijun</name>
<email>oulijun@huawei.com</email>
</author>
<published>2018-04-26T06:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ec2e6cb0201fa8442b978fd03be2a83c9500298'/>
<id>urn:sha1:9ec2e6cb0201fa8442b978fd03be2a83c9500298</id>
<content type='text'>
[ Upstream commit 328d405b3d4c8dd1f06bfd77f498e23281ae348c ]

RDMA read operation is not supported inline data. If user cofigures
issue a RDMA read and use inline data, it will happen a hardware
error.

Signed-off-by: Lijun Ou &lt;oulijun@huawei.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>RDMA/hns: Bugfix for init hem table</title>
<updated>2018-06-20T19:01:30+00:00</updated>
<author>
<name>oulijun</name>
<email>oulijun@huawei.com</email>
</author>
<published>2018-04-26T06:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c87269995e14f56be301be2e460f5f7338b4dbb'/>
<id>urn:sha1:2c87269995e14f56be301be2e460f5f7338b4dbb</id>
<content type='text'>
[ Upstream commit 215a8c09e5e2aa6ae1fbcef87f8f27d65d5d1ca4 ]

During init hem table, type should be used instead of
table-&gt;type which is finally initializaed with type.

Signed-off-by: Lijun Ou &lt;oulijun@huawei.com&gt;
Signed-off-by: Yixian Liu &lt;liuyixian@huawei.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
