<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rpmsg, branch v4.14-rc7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rpmsg: glink: Fix memory leak in qcom_glink_alloc_intent()</title>
<updated>2017-10-10T18:22:09+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-09-08T10:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b775d158530285c9657a1a0628c139b0dfd0d2e5'/>
<id>b775d158530285c9657a1a0628c139b0dfd0d2e5</id>
<content type='text'>
We need to free "intent" and "intent-&gt;data" on a couple error paths.

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents")
Acked-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to free "intent" and "intent-&gt;data" on a couple error paths.

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents")
Acked-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Unlock on error in qcom_glink_request_intent()</title>
<updated>2017-10-10T18:22:09+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-09-08T10:33:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a7480bd327afcccd7263be5b485f85943e1e903'/>
<id>0a7480bd327afcccd7263be5b485f85943e1e903</id>
<content type='text'>
If qcom_glink_tx() fails, then we need to unlock before returning the
error code.

Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
Acked-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If qcom_glink_tx() fails, then we need to unlock before returning the
error code.

Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
Acked-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: initialize ret to zero to ensure error status check is correct</title>
<updated>2017-09-04T17:52:30+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-09-03T13:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed43d098f9020d6669a00bd26fac807d5c19e202'/>
<id>ed43d098f9020d6669a00bd26fac807d5c19e202</id>
<content type='text'>
The new switch cases for RPM_CMD_RX_DONE, RPM_CMD_RX_DONE_W_REUSE,
RPM_CMD_RX_INTENT_REQ_ACK, RPM_CMD_INTENT and RPM_CMD_RX_INTENT_REQ from
4 recent commits are not setting ret and so a later non-zero check on ret
is testing on a garbage value in ret. Fix this by initializing ret to zero.

Detected by CoverityScan CID#1455249 ("Uninitialized scalar variable")

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents)
Fixes: dacbb35e930f ("glink: Receive and store the remote intent buffers")
Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new switch cases for RPM_CMD_RX_DONE, RPM_CMD_RX_DONE_W_REUSE,
RPM_CMD_RX_INTENT_REQ_ACK, RPM_CMD_INTENT and RPM_CMD_RX_INTENT_REQ from
4 recent commits are not setting ret and so a later non-zero check on ret
is testing on a garbage value in ret. Fix this by initializing ret to zero.

Detected by CoverityScan CID#1455249 ("Uninitialized scalar variable")

Fixes: 933b45da5d1d ("rpmsg: glink: Add support for TX intents)
Fixes: dacbb35e930f ("glink: Receive and store the remote intent buffers")
Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: fix null pointer dereference on a null intent</title>
<updated>2017-09-04T17:51:49+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-09-03T12:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=906cf29cfab5806d32c2a274f86f3d076c0a48be'/>
<id>906cf29cfab5806d32c2a274f86f3d076c0a48be</id>
<content type='text'>
In the case where glink-&gt;intentless is true and the call
to qcom_glink_tx fails then we have a condition where ret is
non-zero and intent is null, causing a null pointer deference
when setting intent-&gt;in_use to false.  Add an extra check to
only dereference intent if intent is non-null.

Detected by: CoverityScan CID#1455247 ("Explicit null dereferenced")

Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case where glink-&gt;intentless is true and the call
to qcom_glink_tx fails then we have a condition where ret is
non-zero and intent is null, causing a null pointer deference
when setting intent-&gt;in_use to false.  Add an extra check to
only dereference intent if intent is non-null.

Detected by: CoverityScan CID#1455247 ("Explicit null dereferenced")

Fixes: 88c6060f5a7f ("rpmsg: glink: Handle remote rx done command")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Export symbols from common code</title>
<updated>2017-09-01T00:10:40+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2017-08-31T16:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8ff9777ec48c4c3078e96b33d88109783078a81'/>
<id>f8ff9777ec48c4c3078e96b33d88109783078a81</id>
<content type='text'>
The common code needs to export the probe and remove symbols in order
for the SMEM and RPM drivers to access them when compiled as a module.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The common code needs to export the probe and remove symbols in order
for the SMEM and RPM drivers to access them when compiled as a module.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Release idr lock before returning on error</title>
<updated>2017-08-30T23:26:23+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2017-08-30T23:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5f5423ffa223a0beb755563beac67f741662870b'/>
<id>5f5423ffa223a0beb755563beac67f741662870b</id>
<content type='text'>
The idr_lock should be released in the case that we don't find the given
channel.

Fixes: 44f6df922a26 ("rpmsg: glink: Fix idr_lock from mutex to spinlock")
Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The idr_lock should be released in the case that we don't find the given
channel.

Fixes: 44f6df922a26 ("rpmsg: glink: Fix idr_lock from mutex to spinlock")
Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Handle remote rx done command</title>
<updated>2017-08-30T03:34:16+00:00</updated>
<author>
<name>Sricharan R</name>
<email>sricharan@codeaurora.org</email>
</author>
<published>2017-08-24T07:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88c6060f5a7f3fc1530b2722d5964945e5174358'/>
<id>88c6060f5a7f3fc1530b2722d5964945e5174358</id>
<content type='text'>
Once the remote side sends a rx done ack, check for the intent reuse
information from it and suitably discard or reuse the remote passed
intent buffers.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Once the remote side sends a rx done ack, check for the intent reuse
information from it and suitably discard or reuse the remote passed
intent buffers.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Request for intents when unavailable</title>
<updated>2017-08-30T03:34:15+00:00</updated>
<author>
<name>Sricharan R</name>
<email>sricharan@codeaurora.org</email>
</author>
<published>2017-08-24T07:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27b9c5b66b23edd4daaf9f455b0b3e54bcc2ae4e'/>
<id>27b9c5b66b23edd4daaf9f455b0b3e54bcc2ae4e</id>
<content type='text'>
While sending data, we search for suitable sized intent to map and
simply fail if a intent is not found. Instead request for a intent of
required size and wait till one is alloted.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While sending data, we search for suitable sized intent to map and
simply fail if a intent is not found. Instead request for a intent of
required size and wait till one is alloted.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Use the intents passed by remote</title>
<updated>2017-08-30T03:34:15+00:00</updated>
<author>
<name>Sricharan R</name>
<email>sricharan@codeaurora.org</email>
</author>
<published>2017-08-24T07:21:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=11cb45a7f8c7a09d14a02754f96fa97938a5a1bb'/>
<id>11cb45a7f8c7a09d14a02754f96fa97938a5a1bb</id>
<content type='text'>
While sending data, use the remote intent id buffer of suitable size
that was passed by remote previously.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While sending data, use the remote intent id buffer of suitable size
that was passed by remote previously.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpmsg: glink: Receive and store the remote intent buffers</title>
<updated>2017-08-30T03:34:15+00:00</updated>
<author>
<name>Sricharan R</name>
<email>sricharan@codeaurora.org</email>
</author>
<published>2017-08-24T07:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dacbb35e930f8348f70f2daf58ea6eb42b140a0b'/>
<id>dacbb35e930f8348f70f2daf58ea6eb42b140a0b</id>
<content type='text'>
Just like we allocating and sending intent ids to remote, remote side
allocates and sends us the intents as well.  So save the intent ids and
use it later while sending data targeting the appropriate intents based
on the size.

Acked-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Sricharan R &lt;sricharan@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just like we allocating and sending intent ids to remote, remote side
allocates and sends us the intents as well.  So save the intent ids and
use it later while sending data targeting the appropriate intents based
on the size.

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