<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rpmsg, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-12-21T09:57:30+00:00</updated>
<entry>
<title>rpmsg: glink: Free pending deferred work on remove</title>
<updated>2019-12-21T09:57:30+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2019-10-04T22:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7438617d2cba3c546394fa7bc295f69dfc9fd757'/>
<id>urn:sha1:7438617d2cba3c546394fa7bc295f69dfc9fd757</id>
<content type='text'>
commit 278bcb7300f61785dba63840bd2a8cf79f14554c upstream.

By just cancelling the deferred rx worker during GLINK instance teardown
any pending deferred commands are leaked, so free them.

Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver")
Cc: stable@vger.kernel.org
Acked-by: Chris Lew &lt;clew@codeaurora.org&gt;
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Don't send pending rx_done during remove</title>
<updated>2019-12-21T09:57:29+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2019-10-04T22:27:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f482295198e60b0fbfa552c001c6931c487df83'/>
<id>urn:sha1:6f482295198e60b0fbfa552c001c6931c487df83</id>
<content type='text'>
commit c3dadc19b7564c732598b30d637c6f275c3b77b6 upstream.

Attempting to transmit rx_done messages after the GLINK instance is
being torn down will cause use after free and memory leaks. So cancel
the intent_work and free up the pending intents.

With this there are no concurrent accessors of the channel left during
qcom_glink_native_remove() and there is therefor no need to hold the
spinlock during this operation - which would prohibit the use of
cancel_work_sync() in the release function. So remove this.

Fixes: 1d2ea36eead9 ("rpmsg: glink: Add rx done command")
Cc: stable@vger.kernel.org
Acked-by: Chris Lew &lt;clew@codeaurora.org&gt;
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Fix rpmsg_register_device err handling</title>
<updated>2019-12-21T09:57:28+00:00</updated>
<author>
<name>Chris Lew</name>
<email>clew@codeaurora.org</email>
</author>
<published>2019-10-04T22:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a033a2a6be88d294a81a46175745f4eeebb8e7d7'/>
<id>urn:sha1:a033a2a6be88d294a81a46175745f4eeebb8e7d7</id>
<content type='text'>
commit f7e714988edaffe6ac578318e99501149b067ba0 upstream.

The device release function is set before registering with rpmsg. If
rpmsg registration fails, the framework will call device_put(), which
invokes the release function. The channel create logic does not need to
free rpdev if rpmsg_register_device() fails and release is called.

Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver")
Cc: stable@vger.kernel.org
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Chris Lew &lt;clew@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Put an extra reference during cleanup</title>
<updated>2019-12-21T09:57:28+00:00</updated>
<author>
<name>Chris Lew</name>
<email>clew@codeaurora.org</email>
</author>
<published>2019-10-04T22:26:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=478963b1f86793a13515349e5bf8485117a37c04'/>
<id>urn:sha1:478963b1f86793a13515349e5bf8485117a37c04</id>
<content type='text'>
commit b646293e272816dd0719529dcebbd659de0722f7 upstream.

In a remote processor crash scenario, there is no guarantee the remote
processor sent close requests before it went into a bad state. Remove
the reference that is normally handled by the close command in the
so channel resources can be released.

Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver")
Cc: stable@vger.kernel.org
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Chris Lew &lt;clew@codeaurora.org&gt;
Reported-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Fix use after free in open_ack TIMEOUT case</title>
<updated>2019-12-21T09:57:27+00:00</updated>
<author>
<name>Arun Kumar Neelakantam</name>
<email>aneela@codeaurora.org</email>
</author>
<published>2019-10-04T22:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a5b99adbf6eab308e9986d55505540fe02b1db9'/>
<id>urn:sha1:8a5b99adbf6eab308e9986d55505540fe02b1db9</id>
<content type='text'>
commit ac74ea01860170699fb3b6ea80c0476774c8e94f upstream.

Extra channel reference put when remote sending OPEN_ACK after timeout
causes use-after-free while handling next remote CLOSE command.

Remove extra reference put in timeout case to avoid use-after-free.

Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver")
Cc: stable@vger.kernel.org
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Fix reuse intents memory leak issue</title>
<updated>2019-12-21T09:57:26+00:00</updated>
<author>
<name>Arun Kumar Neelakantam</name>
<email>aneela@codeaurora.org</email>
</author>
<published>2019-10-04T22:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b909f12e3c36e15b6d6b211ebf415c6c55d54557'/>
<id>urn:sha1:b909f12e3c36e15b6d6b211ebf415c6c55d54557</id>
<content type='text'>
commit b85f6b601407347f5425c4c058d1b7871f5bf4f0 upstream.

Memory allocated for re-usable intents are not freed during channel
cleanup which causes memory leak in system.

Check and free all re-usable memory to avoid memory leak.

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents")
Cc: stable@vger.kernel.org
Acked-By: Chris Lew &lt;clew@codeaurora.org&gt;
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Reported-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: Set tail pointer to 0 at end of FIFO</title>
<updated>2019-12-21T09:57:26+00:00</updated>
<author>
<name>Chris Lew</name>
<email>clew@codeaurora.org</email>
</author>
<published>2018-06-28T01:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c4560364d2648128e75fc1e6ce0af98e285a160'/>
<id>urn:sha1:6c4560364d2648128e75fc1e6ce0af98e285a160</id>
<content type='text'>
commit 4623e8bf1de0b86e23a56cdb39a72f054e89c3bd upstream.

When wrapping around the FIFO, the remote expects the tail pointer to
be reset to 0 on the edge case where the tail equals the FIFO length.

Fixes: caf989c350e8 ("rpmsg: glink: Introduce glink smem based transport")
Cc: stable@vger.kernel.org
Signed-off-by: Chris Lew &lt;clew@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: glink: smem: Support rx peak for size less than 4 bytes</title>
<updated>2019-11-24T07:20:05+00:00</updated>
<author>
<name>Arun Kumar Neelakantam</name>
<email>aneela@codeaurora.org</email>
</author>
<published>2018-10-03T11:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=674b223d7a4881229c37322474b4274d4ff7d942'/>
<id>urn:sha1:674b223d7a4881229c37322474b4274d4ff7d942</id>
<content type='text'>
[ Upstream commit 928002a5e9dab2ddc1a0fe3e00739e89be30dc6b ]

The current rx peak function fails to read the data if size is
less than 4bytes.

Use memcpy_fromio to support data reads of size less than 4 bytes.

Cc: stable@vger.kernel.org
Fixes: f0beb4ba9b18 ("rpmsg: glink: Remove chunk size word align warning")
Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: smd: fix memory leak on channel create</title>
<updated>2018-11-13T19:08:55+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-09-27T21:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9632c0339b1217e280f693161498c3152c9c7bb3'/>
<id>urn:sha1:9632c0339b1217e280f693161498c3152c9c7bb3</id>
<content type='text'>
commit 940c620d6af8fca7d115de40f19870fba415efac upstream.

Currently a failed allocation of channel-&gt;name leads to an
immediate return without freeing channel. Fix this by setting
ret to -ENOMEM and jumping to an exit path that kfree's channel.

Detected by CoverityScan, CID#1473692 ("Resource Leak")

Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Cc: stable@vger.kernel.org
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rpmsg: Add compat ioctl for rpmsg char driver</title>
<updated>2018-07-31T06:40:23+00:00</updated>
<author>
<name>Arun Kumar Neelakantam</name>
<email>aneela@codeaurora.org</email>
</author>
<published>2018-07-27T12:17:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00b645e0b4e4a3e5f8d88a4e9acf7e80045c34b4'/>
<id>urn:sha1:00b645e0b4e4a3e5f8d88a4e9acf7e80045c34b4</id>
<content type='text'>
Add compat ioctl callback to support 32bit user space applications.

Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
