<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/infiniband, branch v4.4.235</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-06-30T00:08:01+00:00</updated>
<entry>
<title>RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()</title>
<updated>2020-06-30T00:08:01+00:00</updated>
<author>
<name>Fan Guo</name>
<email>guofan5@huawei.com</email>
</author>
<published>2020-06-12T06:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55344d5fdac029410ab0c1d947c905983bf47ad8'/>
<id>urn:sha1:55344d5fdac029410ab0c1d947c905983bf47ad8</id>
<content type='text'>
[ Upstream commit a17f4bed811c60712d8131883cdba11a105d0161 ]

If ib_dma_mapping_error() returns non-zero value,
ib_mad_post_receive_mads() will jump out of loops and return -ENOMEM
without freeing mad_priv. Fix this memory-leak problem by freeing mad_priv
in this case.

Fixes: 2c34e68f4261 ("IB/mad: Check and handle potential DMA mapping errors")
Link: https://lore.kernel.org/r/20200612063824.180611-1-guofan5@huawei.com
Signed-off-by: Fan Guo &lt;guofan5@huawei.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()'</title>
<updated>2020-06-11T07:21:37+00:00</updated>
<author>
<name>Christophe Jaillet</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2018-06-11T18:15:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b49cae47284561a32e30dc0dedafd978bcc12c8f'/>
<id>urn:sha1:b49cae47284561a32e30dc0dedafd978bcc12c8f</id>
<content type='text'>
commit 3dc7c7badb7502ec3e3aa817a8bdd9e53aa54c52 upstream.

Before returning -EPERM we should release some resources, as already done
in the other error handling path of the function.

Fixes: d8f9cc328c88 ("IB/mlx4: Mark user MR as writable if actual virtual memory is writable")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>IB/qib: Call kobject_put() when kobject_init_and_add() fails</title>
<updated>2020-06-03T06:12:11+00:00</updated>
<author>
<name>Kaike Wan</name>
<email>kaike.wan@intel.com</email>
</author>
<published>2020-05-12T03:13:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7499f1cad7edb8a58dadec902b3a1a4690744120'/>
<id>urn:sha1:7499f1cad7edb8a58dadec902b3a1a4690744120</id>
<content type='text'>
[ Upstream commit a35cd6447effd5c239b564c80fa109d05ff3d114 ]

When kobject_init_and_add() returns an error in the function
qib_create_port_files(), the function kobject_put() is not called for the
corresponding kobject, which potentially leads to memory leak.

This patch fixes the issue by calling kobject_put() even if
kobject_init_and_add() fails. In addition, the ppd-&gt;diagc_kobj is released
along with other kobjects when the sysfs is unregistered.

Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Link: https://lore.kernel.org/r/20200512031328.189865.48627.stgit@awfm-01.aw.intel.com
Cc: &lt;stable@vger.kernel.org&gt;
Suggested-by: Lin Yi &lt;teroincn@gmail.com&gt;
Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Kaike Wan &lt;kaike.wan@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>IB/mlx4: Test return value of calls to ib_get_cached_pkey</title>
<updated>2020-05-20T06:11:48+00:00</updated>
<author>
<name>Jack Morgenstein</name>
<email>jackm@dev.mellanox.co.il</email>
</author>
<published>2020-04-26T07:59:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b559ea48c89923cf68644e560733bf9da9b27519'/>
<id>urn:sha1:b559ea48c89923cf68644e560733bf9da9b27519</id>
<content type='text'>
[ Upstream commit 6693ca95bd4330a0ad7326967e1f9bcedd6b0800 ]

In the mlx4_ib_post_send() flow, some functions call ib_get_cached_pkey()
without checking its return value. If ib_get_cached_pkey() returns an
error code, these functions should return failure.

Fixes: 1ffeb2eb8be9 ("IB/mlx4: SR-IOV IB context objects and proxy/tunnel SQP support")
Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Fixes: e622f2f4ad21 ("IB: split struct ib_send_wr")
Link: https://lore.kernel.org/r/20200426075921.130074-1-leon@kernel.org
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: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup</title>
<updated>2020-05-20T06:11:37+00:00</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2019-12-04T14:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c9d04e1c3ed58f60592329459d9ca7789442ff7'/>
<id>urn:sha1:7c9d04e1c3ed58f60592329459d9ca7789442ff7</id>
<content type='text'>
commit 6c8991f41546c3c472503dff1ea9daaddf9331c2 upstream.

ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.

All users of ipv6_stub-&gt;ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_output helpers) for their IPv4 lookups,
which calls xfrm_lookup_route(). This patch fixes this inconsistent
behavior by switching the stub to ip6_dst_lookup_flow, which also calls
xfrm_lookup_route().

This requires some changes in all the callers, as these two functions
take different arguments and have different return types.

Fixes: 5f81bd2e5d80 ("ipv6: export a stub for IPv6 symbols used by vxlan")
Reported-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 4.4:
 - Drop changes in lwt_bpf.c, mlx5, and rxe
 - Adjust filename, context, indentation]
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0"</title>
<updated>2020-05-20T06:11:34+00:00</updated>
<author>
<name>Alex Estrin</name>
<email>alex.estrin@intel.com</email>
</author>
<published>2017-09-26T13:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e61d5650ded7718156ee2e33dc3c54075fdfc44e'/>
<id>urn:sha1:e61d5650ded7718156ee2e33dc3c54075fdfc44e</id>
<content type='text'>
commit 612601d0013f03de9dc134809f242ba6da9ca252 upstream.

commit 9a9b8112699d will cause core to fail UD QP from being destroyed
on ipoib unload, therefore cause resources leakage.
On pkey change event above patch modifies mgid before calling underlying
driver to detach it from QP. Drivers' detach_mcast() will fail to find
modified mgid it was never given to attach in a first place.
Core qp-&gt;usecnt will never go down, so ib_destroy_qp() will fail.

IPoIB driver actually does take care of new broadcast mgid based on new
pkey by destroying an old mcast object in ipoib_mcast_dev_flush())
....
	if (priv-&gt;broadcast) {
		rb_erase(&amp;priv-&gt;broadcast-&gt;rb_node, &amp;priv-&gt;multicast_tree);
		list_add_tail(&amp;priv-&gt;broadcast-&gt;list, &amp;remove_list);
		priv-&gt;broadcast = NULL;
	}
...

then in restarted ipoib_macst_join_task() creating a new broadcast mcast
object, sending join request and on completion tells the driver to attach
to reinitialized QP:
...
if (!priv-&gt;broadcast) {
...
	broadcast = ipoib_mcast_alloc(dev, 0);
...
	memcpy(broadcast-&gt;mcmember.mgid.raw, priv-&gt;dev-&gt;broadcast + 4,
	       sizeof (union ib_gid));
	priv-&gt;broadcast = broadcast;
...

Fixes: 9a9b8112699d ("IB/ipoib: Update broadcast object if PKey value was changed in index 0")
Cc: stable@vger.kernel.org
Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Alex Estrin &lt;alex.estrin@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Reviewed-by: Feras Daoud &lt;ferasda@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>RDMA/cxgb3: device driver frees DMA memory with different size</title>
<updated>2020-05-10T08:26:00+00:00</updated>
<author>
<name>Honggang Li</name>
<email>honli@redhat.com</email>
</author>
<published>2016-05-23T00:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0da087ed04ebeb42651f5b535d2dc411a836b7b1'/>
<id>urn:sha1:0da087ed04ebeb42651f5b535d2dc411a836b7b1</id>
<content type='text'>
commit 0de4cbb3dddca35ecd06b95918f38439c9c6401f upstream.

[  598.852037] ------------[ cut here ]------------
[  598.856698] WARNING: at lib/dma-debug.c:887 check_unmap+0xf8/0x920()
[  598.863079] cxgb3 0000:01:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000003310000] [map size=17 bytes] [unmap size=16 bytes]
[  598.878265] Modules linked in: xprtrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad kvm_amd kvm ipmi_devintf ipmi_ssif dcdbas pcspkr ipmi_si sg ipmi_msghandler acpi_power_meter amd64_edac_mod shpchp edac_core sp5100_tco k10temp edac_mce_amd i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ata_generic iw_cxgb3 pata_acpi ib_core ib_addr mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm pata_atiixp drm ahci libahci serio_raw i2c_core cxgb3 libata bnx2 mdio dm_mirror dm_region_hash dm_log dm_mod
[  598.946822] CPU: 3 PID: 11820 Comm: cmtime Not tainted 3.10.0-327.el7.x86_64.debug #1
[  598.954681] Hardware name: Dell Inc. PowerEdge R415/0GXH08, BIOS 2.0.2 10/22/2012
[  598.962193]  ffff8808077479a8 000000000381a432 ffff880807747960 ffffffff81700918
[  598.969663]  ffff880807747998 ffffffff8108b6c0 ffff880807747a80 ffff8808063f55c0
[  598.977132]  ffffffff833ca850 0000000000000282 ffff88080b1bb800 ffff880807747a00
[  598.984602] Call Trace:
[  598.987062]  [&lt;ffffffff81700918&gt;] dump_stack+0x19/0x1b
[  598.992224]  [&lt;ffffffff8108b6c0&gt;] warn_slowpath_common+0x70/0xb0
[  598.998254]  [&lt;ffffffff8108b75c&gt;] warn_slowpath_fmt+0x5c/0x80
[  599.004033]  [&lt;ffffffff813903b8&gt;] check_unmap+0xf8/0x920
[  599.009369]  [&lt;ffffffff81025959&gt;] ? sched_clock+0x9/0x10
[  599.014702]  [&lt;ffffffff81390cee&gt;] debug_dma_free_coherent+0x7e/0xa0
[  599.021008]  [&lt;ffffffffa01ece2c&gt;] cxio_destroy_cq+0xcc/0x160 [iw_cxgb3]
[  599.027654]  [&lt;ffffffffa01e8da0&gt;] iwch_destroy_cq+0xf0/0x140 [iw_cxgb3]
[  599.034307]  [&lt;ffffffffa01c4bfe&gt;] ib_destroy_cq+0x1e/0x30 [ib_core]
[  599.040601]  [&lt;ffffffffa04ff2d2&gt;] ib_uverbs_close+0x302/0x4d0 [ib_uverbs]
[  599.047417]  [&lt;ffffffff812335a2&gt;] __fput+0x102/0x310
[  599.052401]  [&lt;ffffffff8123388e&gt;] ____fput+0xe/0x10
[  599.057297]  [&lt;ffffffff810bbde4&gt;] task_work_run+0xb4/0xe0
[  599.062719]  [&lt;ffffffff81092a84&gt;] do_exit+0x304/0xc60
[  599.067789]  [&lt;ffffffff81025905&gt;] ? native_sched_clock+0x35/0x80
[  599.073820]  [&lt;ffffffff81025959&gt;] ? sched_clock+0x9/0x10
[  599.079153]  [&lt;ffffffff8170a49c&gt;] ? _raw_spin_unlock_irq+0x2c/0x50
[  599.085358]  [&lt;ffffffff8109346c&gt;] do_group_exit+0x4c/0xc0
[  599.090779]  [&lt;ffffffff810a8661&gt;] get_signal_to_deliver+0x2e1/0x960
[  599.097071]  [&lt;ffffffff8101c497&gt;] do_signal+0x57/0x6e0
[  599.102229]  [&lt;ffffffff81714bd1&gt;] ? sysret_signal+0x5/0x4e
[  599.107738]  [&lt;ffffffff8101cb7f&gt;] do_notify_resume+0x5f/0xb0
[  599.113418]  [&lt;ffffffff81714e7d&gt;] int_signal+0x12/0x17
[  599.118576] ---[ end trace 1e4653102e7e7019 ]---
[  599.123211] Mapped at:
[  599.125577]  [&lt;ffffffff8138ed8b&gt;] debug_dma_alloc_coherent+0x2b/0x80
[  599.131968]  [&lt;ffffffffa01ec862&gt;] cxio_create_cq+0xf2/0x1f0 [iw_cxgb3]
[  599.139920]  [&lt;ffffffffa01e9c05&gt;] iwch_create_cq+0x105/0x4e0 [iw_cxgb3]
[  599.147895]  [&lt;ffffffffa0500584&gt;] create_cq.constprop.14+0x184/0x2e0 [ib_uverbs]
[  599.156649]  [&lt;ffffffffa05027fb&gt;] ib_uverbs_create_cq+0x10b/0x140 [ib_uverbs]

Fixes: b955150ea784 ('RDMA/cxgb3: When a user QP is marked in error, also mark the CQs in error')
Signed-off-by: Honggang Li &lt;honli@redhat.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>IB/mlx5: Fix FW version diaplay in sysfs</title>
<updated>2020-05-10T08:25:55+00:00</updated>
<author>
<name>Eran Ben Elisha</name>
<email>eranbe@mellanox.com</email>
</author>
<published>2016-06-04T12:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d4d0cd6198770541035e85e4cd51a2a02eb6613'/>
<id>urn:sha1:7d4d0cd6198770541035e85e4cd51a2a02eb6613</id>
<content type='text'>
commit c0fcebf55289c48148992eee002a7caf853a5358 upstream.

Add a 4-digit padding to show FW version in proper format.

Fixes: 9603b61de1eee ('mlx5: Move pci device handling from...')
Signed-off-by: Eran Ben Elisha &lt;eranbe@mellanox.com&gt;
Signed-off-by: Noa Osherovich &lt;noaos@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/mlx5: Fix RC transport send queue overhead computation</title>
<updated>2020-05-10T08:25:54+00:00</updated>
<author>
<name>Leon Romanovsky</name>
<email>leon@leon.nu</email>
</author>
<published>2016-02-11T19:09:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74937a83b2b00a48b4f55761e461ae0f85cd1276'/>
<id>urn:sha1:74937a83b2b00a48b4f55761e461ae0f85cd1276</id>
<content type='text'>
commit 75c1657e1d50730dc0130a67977f7831a4e241f4 upstream.

Fix the RC QPs send queue overhead computation to take into account
two additional segments in the WQE which are needed for registration
operations.

The ATOMIC and UMR segments can't coexist together, so chose maximum out
of them.

The commit 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead
computation") was intended to update RC transport as commit messages
states, but added the code to UC transport.

Fixes: 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead computation")
Signed-off-by: Kamal Heib &lt;kamalh@mellanox.com&gt;
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>
</entry>
<entry>
<title>IB/mlx4: Initialize hop_limit when creating address handle</title>
<updated>2020-05-10T08:25:53+00:00</updated>
<author>
<name>Matan Barak</name>
<email>matanb@mellanox.com</email>
</author>
<published>2016-01-14T15:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e01128e3cef06652fe39797cc24bb5b3c90bbf5d'/>
<id>urn:sha1:e01128e3cef06652fe39797cc24bb5b3c90bbf5d</id>
<content type='text'>
commit 4e4081673445485aa6bc90383bdb83e7a96cc48a upstream.

Hop limit value wasn't copied from attributes  when ah was created.
This may influence packets for unconnected services to get dropped in
routers when endpoints are not in the same subnet.

Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE")
Signed-off-by: Matan Barak &lt;matanb@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>
</feed>
