<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rapidio, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-21T00:18:35+00:00</updated>
<entry>
<title>rapidio: fix rio_dma_transfer error handling</title>
<updated>2018-04-21T00:18:35+00:00</updated>
<author>
<name>Ioan Nicu</name>
<email>ioan.nicu.ext@nokia.com</email>
</author>
<published>2018-04-20T21:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5157b76869ba98c3a99a1982396437464e131a6'/>
<id>urn:sha1:c5157b76869ba98c3a99a1982396437464e131a6</id>
<content type='text'>
Some of the mport_dma_req structure members were initialized late
inside the do_dma_request() function, just before submitting the
request to the dma engine. But we have some error branches before
that. In case of such an error, the code would return on the error
path and trigger the calling of dma_req_free() with a req structure
which is not completely initialized. This causes a NULL pointer
dereference in dma_req_free().

This patch fixes these error branches by making sure that all
necessary mport_dma_req structure members are initialized in
rio_dma_transfer() immediately after the request structure gets
allocated.

Link: http://lkml.kernel.org/r/20180412150605.GA31409@nokia.com
Fixes: bbd876adb8c72 ("rapidio: use a reference count for struct mport_dma_req")
Signed-off-by: Ioan Nicu &lt;ioan.nicu.ext@nokia.com&gt;
Tested-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Acked-by: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Barry Wood &lt;barry.wood@idt.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Cc: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Frank Kunz &lt;frank.kunz@nokia.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[4.6+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: use a reference count for struct mport_dma_req</title>
<updated>2018-04-11T17:28:37+00:00</updated>
<author>
<name>Ioan Nicu</name>
<email>ioan.nicu.ext@nokia.com</email>
</author>
<published>2018-04-10T23:35:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbd876adb8c7294ad86ef0542d6b528b7ab06f48'/>
<id>urn:sha1:bbd876adb8c7294ad86ef0542d6b528b7ab06f48</id>
<content type='text'>
Once the dma request is passed to the DMA engine, the DMA subsystem
would hold a pointer to this structure and could call the completion
callback after do_dma_request() has timed out.

The current code deals with this by putting timed out SYNC requests to a
pending list and freeing them later, when the mport cdev device is
released.  This still does not guarantee that the DMA subsystem is
really done with those transfers, so in theory
dma_xfer_callback/dma_req_free could be called after
mport_cdev_release_dma and could potentially access already freed
memory.

This patch simplifies the current handling by using a kref in the mport
dma request structure, so that it gets freed only when nobody uses it
anymore.

This also simplifies the code a bit, as FAF transfers are now handled in
the same way as SYNC and ASYNC transfers.  There is no need anymore for
the pending list and for the dma workqueue which was used in case of FAF
transfers, so we remove them both.

Link: http://lkml.kernel.org/r/20180405203342.GA16191@nokia.com
Signed-off-by: Ioan Nicu &lt;ioan.nicu.ext@nokia.com&gt;
Acked-by: Alexandre Bounine &lt;alex.bou9@gmail.com&gt;
Cc: Barry Wood &lt;barry.wood@idt.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@intel.com&gt;
Cc: Frank Kunz &lt;frank.kunz@nokia.com&gt;
Cc: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rapidio/rio-scan.c: fix typo in comment</title>
<updated>2018-04-11T17:28:37+00:00</updated>
<author>
<name>Vasyl Gomonovych</name>
<email>gomonovych@gmail.com</email>
</author>
<published>2018-04-10T23:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b94bb1f6104a1d66b8900d79eb0d28fd894c380e'/>
<id>urn:sha1:b94bb1f6104a1d66b8900d79eb0d28fd894c380e</id>
<content type='text'>
Fix typo in the words 'receiver', 'specified', 'during'

Link: http://lkml.kernel.org/r/20180321211035.8904-1-gomonovych@gmail.com
Signed-off-by: Vasyl Gomonovych &lt;gomonovych@gmail.com&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro</title>
<updated>2018-02-16T00:41:06+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2017-12-15T22:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7babfa5b4bf0a9574c9b30f657b1d87abc5a84cf'/>
<id>urn:sha1:7babfa5b4bf0a9574c9b30f657b1d87abc5a84cf</id>
<content type='text'>
Use the existing PCI_EXP_DEVCTL2_COMP_TIMEOUT macro instead of hard-coding
the PCIe Completion Timeout Value mask.  No functional change intended.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;</content>
</entry>
<entry>
<title>vfs: do bulk POLL* -&gt; EPOLL* replacement</title>
<updated>2018-02-11T22:34:03+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-02-11T22:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9a08845e9acbd224e4ee466f5c1275ed50054e8'/>
<id>urn:sha1:a9a08845e9acbd224e4ee466f5c1275ed50054e8</id>
<content type='text'>
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
        L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
        for f in $L; do sed -i "-es/^\([^\"]*\)\(\&lt;POLL$V\&gt;\)/\\1E\\2/" $f; done
    done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do.  But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rapidio/devices/tsi721_dma.c: adjust six checks for null pointers</title>
<updated>2018-02-07T02:32:46+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-06T23:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eab216e9cc636c24cec06bdf57a80f4c26b34493'/>
<id>urn:sha1:eab216e9cc636c24cec06bdf57a80f4c26b34493</id>
<content type='text'>
checkpatch pointed out the following:

  Comparison to NULL could be written !...

Thus fix the affected source code places.

Link: http://lkml.kernel.org/r/c3e79a1a-891e-cb62-990f-bd99839311b9@users.sourceforge.net
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.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: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rapidio/devices/tsi721_dma.c: delete an unnecessary variable initialisation in tsi721_alloc_chan_resources()</title>
<updated>2018-02-07T02:32:46+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-06T23:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d94a03c80ce7bd0b72483246277c5d21e7c5ff3'/>
<id>urn:sha1:6d94a03c80ce7bd0b72483246277c5d21e7c5ff3</id>
<content type='text'>
The local variable "desc" will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Link: http://lkml.kernel.org/r/728d8e20-4ae9-d661-d932-2d99ce67e71f@users.sourceforge.net
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.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: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rapidio/devices/tsi721_dma.c: delete an error message for a failed memory allocation in tsi721_alloc_chan_resources()</title>
<updated>2018-02-07T02:32:46+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-06T23:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28a5cd5182f292f426d99bafff9ca0d8c9e4a6d8'/>
<id>urn:sha1:28a5cd5182f292f426d99bafff9ca0d8c9e4a6d8</id>
<content type='text'>
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://lkml.kernel.org/r/a96fcaf8-ea24-bcac-0214-273620349d42@users.sourceforge.net
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.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: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: move 12 EXPORT_SYMBOL_GPL() calls to function implementations</title>
<updated>2018-02-07T02:32:46+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-06T23:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ba61ecacbac10e74e5ac816ac4e02bf5737fe38'/>
<id>urn:sha1:4ba61ecacbac10e74e5ac816ac4e02bf5737fe38</id>
<content type='text'>
checkpatch pointed information out like the following.

  WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Thus fix the affected source code places.

Link: http://lkml.kernel.org/r/5f51f606-ece8-7bff-bb86-81d182c49b98@users.sourceforge.net
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.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: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rapidio: return an error code only as a constant in two functions</title>
<updated>2018-02-07T02:32:46+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-06T23:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1acd14bfe9f191dcd80df99f80ec3880a706801e'/>
<id>urn:sha1:1acd14bfe9f191dcd80df99f80ec3880a706801e</id>
<content type='text'>
* Return an error code without storing it in an intermediate variable.

* Delete the label "out" and local variable "rc" which became unnecessary
  with this refactoring.

Link: http://lkml.kernel.org/r/8db441e1-c227-64e7-4747-095da63d7a2e@users.sourceforge.net
Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Alexandre Bounine &lt;alexandre.bounine@idt.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: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
