<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/drivers/rapidio/devices, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-21T23:34:35+00:00</updated>
<entry>
<title>rapidio: use dmaengine_get_dma_device() instead of chan-&gt;device-&gt;dev</title>
<updated>2026-09-21T23:34:35+00:00</updated>
<author>
<name>Frank Li</name>
<email>Frank.Li@nxp.com</email>
</author>
<published>2026-09-17T20:50:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0792092f5781ebe9ec803763aee169dd6cddd243'/>
<id>urn:sha1:0792092f5781ebe9ec803763aee169dd6cddd243</id>
<content type='text'>
Replace direct dma_chan::device::dev access with the proper
dmaengine_get_dma_device() for consumer API.

chan-&gt;device-&gt;dev is not always the device used for DMA mapping.  Some DMA
engines support per-channel IOMMU mappings, so different channels may use
different DMA devices.  dmaengine_get_dma_device() returns the correct
device for each channel.

This also prepares for making the DMA engine provider data structures
private.  DMA consumers should not access DMA engine internals directly.

Assisted-by: LLM
Link: https://lore.kernel.org/20260917205016.1293317-1-Frank.Li@oss.nxp.com
Signed-off-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: mport_cdev: fix use-after-free in mport_mm_close()</title>
<updated>2026-09-21T23:34:30+00:00</updated>
<author>
<name>James Kim</name>
<email>james010kim@gmail.com</email>
</author>
<published>2026-09-14T04:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d83349bb6b49c99f62232a1d2c16eaea31ecc43d'/>
<id>urn:sha1:d83349bb6b49c99f62232a1d2c16eaea31ecc43d</id>
<content type='text'>
A use-after-free vulnerability was identified in mport_mm_close() in
drivers/rapidio/devices/rio_mport_cdev.c, identical to the pattern
previously addressed in dma_req_free().

This is observable from userspace when an application creates an mmap
mapping via the RapidIO character device and subsequently unmaps it (or
terminates, triggering exit_mmap()).  During munmap, mport_mm_close() is
invoked and drops the mapping reference via kref_put().

If kref_put() drops the last reference, mport_release_mapping() is called,
which frees the underlying rio_mport_mapping structure.  The subsequent
mutex_unlock() then dereferences map-&gt;md to unlock buf_mutex, leading to a
use-after-free:

   mport_mm_close()
     -&gt; mutex_lock(&amp;map-&gt;md-&gt;buf_mutex);
     ...
     -&gt; kref_put(&amp;map-&gt;ref, mport_release_mapping); /* map is freed */
     -&gt; mutex_unlock(&amp;map-&gt;md-&gt;buf_mutex);          /* UAF: map used */

Fix this by caching map-&gt;md before kref_put() and using the cached pointer
for mutex unlocking, ensuring that freed memory is not accessed.

Link: https://lore.kernel.org/20260914042327.49798-1-james010kim@gmail.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: James Kim &lt;james010kim@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: mport_cdev: fix use-after-free in dma_req_free()</title>
<updated>2026-08-05T18:20:14+00:00</updated>
<author>
<name>James Kim</name>
<email>james010kim@gmail.com</email>
</author>
<published>2026-07-23T23:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5cbef379a94b161726c5f504598bf4791d45cedc'/>
<id>urn:sha1:5cbef379a94b161726c5f504598bf4791d45cedc</id>
<content type='text'>
dma_req_free() acquires buf_mutex through req-&gt;map, drops the mapping
reference with kref_put(), and then dereferences req-&gt;map again to unlock
the mutex.

If kref_put() drops the last reference, mport_release_mapping() frees the
mapping, and the subsequent mutex_unlock() dereferences a freed object. 
This is a use-after-free.

Fix this by caching map and md before kref_put(), clearing req-&gt;map while
holding buf_mutex, and using the cached md for mutex unlocking.

The bug is reachable from userspace via the RapidIO mport character device
interface.

Link: https://lore.kernel.org/20260723235220.588424-1-james010kim@gmail.com
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Signed-off-by: James Kim &lt;james010kim@gmail.com&gt;
Reviewed-by: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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;
</content>
</entry>
<entry>
<title>rapidio/tsi721: prevent a bad dereference in tsi721_db_dpc()</title>
<updated>2026-05-29T04:24:45+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2026-05-08T07:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fc15e3a30ddd950f009c76765331783b9af94a87'/>
<id>urn:sha1:fc15e3a30ddd950f009c76765331783b9af94a87</id>
<content type='text'>
With a list_for_each() loop, if we don't find the item we are looking for
in the list, then the loop exits with the iterator, which is "dbell" in
this loop, pointing to invalid memory.

This code uses the "found" variable to determine if we have found the
doorbell we are looking for or not.  However, the problem that the "found"
variable needs to be set to false at the start of each iteration,
otherwise after the first correct doorbell, then everything is marked as
found.

Reset the "found" to false at the start of the iteration and move the
variable inside the loop.

Link: https://lore.kernel.org/af2WHMZiqMwdYveO@stanley.mountain
Fixes: 48618fb4e522 ("RapidIO: add mport driver for Tsi721 bridge")
Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Chul Kim &lt;chul.kim@idt.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>rapidio: remove some dead defines</title>
<updated>2025-05-12T00:54:09+00:00</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-04-19T20:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b7df1f254e1a326e6c55698b76bf407df4ec6b6c'/>
<id>urn:sha1:b7df1f254e1a326e6c55698b76bf407df4ec6b6c</id>
<content type='text'>
Patch series "rapidio deadcoding".

A couple of rapidio deadcoding patches.  The first of these is a repost
and was originally posted almost a year ago
https://lore.kernel.org/all/20240528002515.211366-1-linux@treblig.org/ but
got no answer.  Other than being rebased and a typo fixed, it's not
changed.


This patch (of 2):

'mport_dma_buf', 'rio_mport_dma_map' and 'MPORT_MAX_DMA_BUFS' were added
in the original commit e8de370188d0 ("rapidio: add mport char device
driver") but never used.

'rio_cm_work' was unused since the original commit b6e8d4aa1110 ("rapidio:
add RapidIO channelized messaging driver") but never used.

Remove them.

Link: https://lkml.kernel.org/r/20250419203012.429787-1-linux@treblig.org
Link: https://lkml.kernel.org/r/20250419203012.429787-2-linux@treblig.org
Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&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;
</content>
</entry>
<entry>
<title>rapidio: fix an API misues when rio_add_net() fails</title>
<updated>2025-03-06T05:36:19+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.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b2ef51c74b0171fde7eb69b6152d3d2f743ef269'/>
<id>urn:sha1:b2ef51c74b0171fde7eb69b6152d3d2f743ef269</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rapidio/tsi721: fix kernel-doc warnings</title>
<updated>2023-12-20T23:02:57+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-12-06T17:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4600c4bcd9fca2d7e66963ce1d1132921250e585'/>
<id>urn:sha1:4600c4bcd9fca2d7e66963ce1d1132921250e585</id>
<content type='text'>
Correct kernel-doc comments in tsi721.c and tsi721_dma.c to prevent
warnings from scripts/kernel-doc.

tsi721_dma.c:293: warning: expecting prototype for tsi721_omsg_msix(). Prototype was for tsi721_bdma_msix() instead

tsi721.c:215: warning: Function parameter or member 'data' not described in 'tsi721_cread_dma'
tsi721.c:215: warning: Excess function parameter 'val' description in 'tsi721_cread_dma'
tsi721.c:238: warning: Function parameter or member 'data' not described in 'tsi721_cwrite_dma'
tsi721.c:238: warning: Excess function parameter 'val' description in 'tsi721_cwrite_dma'
tsi721.c:2548: warning: Function parameter or member 'attr' not described in 'tsi721_query_mport'
tsi721.c:2548: warning: Excess function parameter 'mbox' description in 'tsi721_query_mport'
and 27 warnings like this one:
tsi721.c:59: warning: No description found for return value of 'tsi721_lcread'

Link: https://lkml.kernel.org/r/20231206175528.16386-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: make all 'class' structures const</title>
<updated>2023-10-05T11:51:35+00:00</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-08-10T19:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d712d205210c494c29f33dc1d1f2ce4d7448faa9'/>
<id>urn:sha1:d712d205210c494c29f33dc1d1f2ce4d7448faa9</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, making all 'class' structures to be declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at load time.

Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Link: https://lore.kernel.org/r/20230810195103.27069-1-ivan.orlov0322@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
