<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rapidio, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:20:50+00:00</updated>
<entry>
<title>rapidio: replace rio_free_net() with kfree() in rio_scan_alloc_net()</title>
<updated>2026-03-04T12:20:50+00:00</updated>
<author>
<name>Haoxiang Li</name>
<email>lihaoxiang@isrc.iscas.ac.cn</email>
</author>
<published>2026-01-21T01:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fecf292c6691970897396190855aa38826b7104e'/>
<id>urn:sha1:fecf292c6691970897396190855aa38826b7104e</id>
<content type='text'>
[ Upstream commit 666183dcdd9ad3b8156a1df7f204f728f720380f ]

When idtab allocation fails, net is not registered with rio_add_net() yet,
so kfree(net) is sufficient to release the memory.  Set mport-&gt;net to NULL
to avoid dangling pointer.

Link: https://lkml.kernel.org/r/20260121013508.195836-1-lihaoxiang@isrc.iscas.ac.cn
Fixes: e6b585ca6e81 ("rapidio: move net allocation into core code")
Signed-off-by: Haoxiang Li &lt;lihaoxiang@isrc.iscas.ac.cn&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/rapidio/rio_cm.c: prevent possible heap overwrite</title>
<updated>2025-06-27T10:07:36+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2025-06-08T00:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecf5ee280b702270afb02f61b299d3dfe3ec7730'/>
<id>urn:sha1:ecf5ee280b702270afb02f61b299d3dfe3ec7730</id>
<content type='text'>
commit 50695153d7ddde3b1696dbf0085be0033bf3ddb3 upstream.

In

riocm_cdev_ioctl(RIO_CM_CHAN_SEND)
   -&gt; cm_chan_msg_send()
      -&gt; riocm_ch_send()

cm_chan_msg_send() checks that userspace didn't send too much data but
riocm_ch_send() failed to check that userspace sent sufficient data.  The
result is that riocm_ch_send() can write to fields in the rio_ch_chan_hdr
which were outside the bounds of the space which cm_chan_msg_send()
allocated.

Address this by teaching riocm_ch_send() to check that the entire
rio_ch_chan_hdr was copied in from userspace.

Reported-by: maher azz &lt;maherazz04@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linuxfoundation.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: fix an API misues when rio_add_net() fails</title>
<updated>2025-03-13T11:53:15+00:00</updated>
<author>
<name>Haoxiang Li</name>
<email>haoxiang_li2024@163.com</email>
</author>
<published>2025-02-27T07:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5f5e520e8fbc6294020ff8afa36f684d92c6e6a'/>
<id>urn:sha1:a5f5e520e8fbc6294020ff8afa36f684d92c6e6a</id>
<content type='text'>
commit b2ef51c74b0171fde7eb69b6152d3d2f743ef269 upstream.

rio_add_net() calls device_register() and fails when device_register()
fails.  Thus, put_device() should be used rather than kfree().  Add
"mport-&gt;net = NULL;" to avoid a use after free issue.

Link: https://lkml.kernel.org/r/20250227073409.3696854-1-haoxiang_li2024@163.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: Haoxiang Li &lt;haoxiang_li2024@163.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: add check for rio_add_net() in rio_scan_alloc_net()</title>
<updated>2025-03-13T11:53:14+00:00</updated>
<author>
<name>Haoxiang Li</name>
<email>haoxiang_li2024@163.com</email>
</author>
<published>2025-02-27T04:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad82be4298a89a9ae46f07128bdf3d8614bce745'/>
<id>urn:sha1:ad82be4298a89a9ae46f07128bdf3d8614bce745</id>
<content type='text'>
commit e842f9a1edf306bf36fe2a4d847a0b0d458770de upstream.

The return value of rio_add_net() should be checked.  If it fails,
put_device() should be called to free the memory and give up the reference
initialized in rio_add_net().

Link: https://lkml.kernel.org/r/20250227041131.3680761-1-haoxiang_li2024@163.com
Fixes: e6b585ca6e81 ("rapidio: move net allocation into core code")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Haoxiang Li &lt;haoxiang_li2024@163.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: devices: fix missing put_device in mport_cdev_open</title>
<updated>2022-12-31T12:32:00+00:00</updated>
<author>
<name>Cai Xinchen</name>
<email>caixinchen1@huawei.com</email>
</author>
<published>2022-12-03T08:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b596242585984b5f3085aa8f7a82c65640b384b6'/>
<id>urn:sha1:b596242585984b5f3085aa8f7a82c65640b384b6</id>
<content type='text'>
[ Upstream commit d5b6e6eba3af11cb2a2791fa36a2524990fcde1a ]

When kfifo_alloc fails, the refcount of chdev-&gt;dev is left incremental.
We should use put_device(&amp;chdev-&gt;dev) to decrease the ref count of
chdev-&gt;dev to avoid refcount leak.

Link: https://lkml.kernel.org/r/20221203085721.13146-1-caixinchen1@huawei.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: Cai Xinchen &lt;caixinchen1@huawei.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Jakob Koschel &lt;jakobkoschel@gmail.com&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Wang Weiyang &lt;wangweiyang2@huawei.com&gt;
Cc: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: fix possible UAF when kfifo_alloc() fails</title>
<updated>2022-12-31T12:32:00+00:00</updated>
<author>
<name>Wang Weiyang</name>
<email>wangweiyang2@huawei.com</email>
</author>
<published>2022-11-23T09:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb87af2c19c0993f6e21f75b963a5599c5a73e76'/>
<id>urn:sha1:cb87af2c19c0993f6e21f75b963a5599c5a73e76</id>
<content type='text'>
[ Upstream commit 02d7d89f816951e0862147d751b1150d67aaebdd ]

If kfifo_alloc() fails in mport_cdev_open(), goto err_fifo and just free
priv. But priv is still in the chdev-&gt;file_list, then list traversal
may cause UAF. This fixes the following smatch warning:

drivers/rapidio/devices/rio_mport_cdev.c:1930 mport_cdev_open() warn: '&amp;priv-&gt;list' not removed from list

Link: https://lkml.kernel.org/r/20221123095147.52408-1-wangweiyang2@huawei.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: Wang Weiyang &lt;wangweiyang2@huawei.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Jakob Koschel &lt;jakobkoschel@gmail.com&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: rio: fix possible name leak in rio_register_mport()</title>
<updated>2022-12-31T12:31:58+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-14T15:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9abba4aa60874c5216fc8de7dededadc791de696'/>
<id>urn:sha1:9abba4aa60874c5216fc8de7dededadc791de696</id>
<content type='text'>
[ Upstream commit e92a216d16bde65d21a3227e0fb2aa0794576525 ]

If device_register() returns error, the name allocated by dev_set_name()
need be freed.  It should use put_device() to give up the reference in the
error path, so that the name can be freed in kobject_cleanup(), and
list_del() is called to delete the port from rio_mports.

Link: https://lkml.kernel.org/r/20221114152636.2939035-3-yangyingliang@huawei.com
Fixes: 2aaf308b95b2 ("rapidio: rework device hierarchy and introduce mport class of devices")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: fix possible name leaks when rio_add_device() fails</title>
<updated>2022-12-31T12:31:58+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-14T15:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85fbf58b15c09d3a6a03098c1e42ebfe9002f39d'/>
<id>urn:sha1:85fbf58b15c09d3a6a03098c1e42ebfe9002f39d</id>
<content type='text'>
[ Upstream commit f9574cd48679926e2a569e1957a5a1bcc8a719ac ]

Patch series "rapidio: fix three possible memory leaks".

This patchset fixes three name leaks in error handling.
 - patch #1 fixes two name leaks while rio_add_device() fails.
 - patch #2 fixes a name leak while  rio_register_mport() fails.

This patch (of 2):

If rio_add_device() returns error, the name allocated by dev_set_name()
need be freed.  It should use put_device() to give up the reference in the
error path, so that the name can be freed in kobject_cleanup(), and the
'rdev' can be freed in rio_release_dev().

Link: https://lkml.kernel.org/r/20221114152636.2939035-1-yangyingliang@huawei.com
Link: https://lkml.kernel.org/r/20221114152636.2939035-2-yangyingliang@huawei.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: remove unnecessary use of list iterator</title>
<updated>2022-04-29T21:38:03+00:00</updated>
<author>
<name>Jakob Koschel</name>
<email>jakobkoschel@gmail.com</email>
</author>
<published>2022-04-29T21:38:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8323a0cb9a66d8d8747c463211392a2cfc4c1dc'/>
<id>urn:sha1:f8323a0cb9a66d8d8747c463211392a2cfc4c1dc</id>
<content type='text'>
req-&gt;map is set in the valid case and always equals 'map' if the break was
hit.  It therefore is unnecessary to use the list iterator variable and
the use of 'map' can be replaced with req-&gt;map.

This is done in preparation to limit the scope of a list iterator to the
list traversal loop [1].

Link: https://lore.kernel.org/all/YhdfEIwI4EdtHdym@kroah.com/
Link: https://lkml.kernel.org/r/20220319203344.2547702-1-jakobkoschel@gmail.com
Signed-off-by: Jakob Koschel &lt;jakobkoschel@gmail.com&gt;
Reviewed-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Mike Rapoport &lt;rppt@kernel.org&gt;
Cc: "Brian Johannesmeyer" &lt;bjohannesmeyer@gmail.com&gt;
Cc: Cristiano Giuffrida &lt;c.giuffrida@vu.nl&gt;
Cc: "Bos, H.J." &lt;h.j.bos@vu.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio/tsi721: Remove usage of the deprecated "pci-dma-compat.h" API</title>
<updated>2022-02-25T16:19:21+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-01-06T21:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c155674d9757be855547dc4eb6bcb82d52482e7'/>
<id>urn:sha1:8c155674d9757be855547dc4eb6bcb82d52482e7</id>
<content type='text'>
In [1], Christoph Hellwig has proposed to remove the wrappers in
include/linux/pci-dma-compat.h.

Some reasons why this API should be removed have been given by Julia
Lawall in [2].

A coccinelle script has been used to perform the needed transformation.
It can be found in [3].

[1]: https://lore.kernel.org/kernel-janitors/20200421081257.GA131897@infradead.org/
[2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/
[3]: https://lore.kernel.org/kernel-janitors/20200716192821.321233-1-christophe.jaillet@wanadoo.fr/

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
