<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/rpmsg/qcom_glink_native.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-10-17T13:23:20Z</updated>
<entry>
<title>rpmsg: glink: Free pending deferred work on remove</title>
<updated>2019-10-17T13:23:20Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2019-10-04T22:27:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=278bcb7300f61785dba63840bd2a8cf79f14554c'/>
<id>urn:sha1:278bcb7300f61785dba63840bd2a8cf79f14554c</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Don't send pending rx_done during remove</title>
<updated>2019-10-17T13:23:10Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2019-10-04T22:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3dadc19b7564c732598b30d637c6f275c3b77b6'/>
<id>urn:sha1:c3dadc19b7564c732598b30d637c6f275c3b77b6</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Fix rpmsg_register_device err handling</title>
<updated>2019-10-16T16:38:22Z</updated>
<author>
<name>Chris Lew</name>
</author>
<published>2019-10-04T22:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7e714988edaffe6ac578318e99501149b067ba0'/>
<id>urn:sha1:f7e714988edaffe6ac578318e99501149b067ba0</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Put an extra reference during cleanup</title>
<updated>2019-10-16T16:38:22Z</updated>
<author>
<name>Chris Lew</name>
</author>
<published>2019-10-04T22:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b646293e272816dd0719529dcebbd659de0722f7'/>
<id>urn:sha1:b646293e272816dd0719529dcebbd659de0722f7</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Fix use after free in open_ack TIMEOUT case</title>
<updated>2019-10-16T16:38:20Z</updated>
<author>
<name>Arun Kumar Neelakantam</name>
</author>
<published>2019-10-04T22:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac74ea01860170699fb3b6ea80c0476774c8e94f'/>
<id>urn:sha1:ac74ea01860170699fb3b6ea80c0476774c8e94f</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Fix reuse intents memory leak issue</title>
<updated>2019-10-16T16:38:15Z</updated>
<author>
<name>Arun Kumar Neelakantam</name>
</author>
<published>2019-10-04T22:26:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b85f6b601407347f5425c4c058d1b7871f5bf4f0'/>
<id>urn:sha1:b85f6b601407347f5425c4c058d1b7871f5bf4f0</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>rpmsg: glink: Use struct_size() helper</title>
<updated>2019-08-29T18:24:31Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2019-08-29T18:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61c65f47f30a1f32e0a84fe8335cd0360a028b48'/>
<id>urn:sha1:61c65f47f30a1f32e0a84fe8335cd0360a028b48</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct {
	...
	struct intent_pair intents[];
} __packed * msg;

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

So, replace the following form:

sizeof(*msg) + sizeof(struct intent_pair) * count

with:

struct_size(msg, intents, count)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: glink: Remove chunk size word align warning</title>
<updated>2018-09-01T21:00:43Z</updated>
<author>
<name>Chris Lew</name>
</author>
<published>2018-07-27T12:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0beb4ba9b185d497c8efe7b349363700092aee0'/>
<id>urn:sha1:f0beb4ba9b185d497c8efe7b349363700092aee0</id>
<content type='text'>
It is possible for the chunk sizes coming from the non RPM remote procs
to not be word aligned. Remove the alignment warning and continue to
read from the FIFO so execution is not stalled.

Signed-off-by: Chris Lew &lt;clew@codeaurora.org&gt;
Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: glink: Store edge name for glink device</title>
<updated>2018-07-31T06:39:04Z</updated>
<author>
<name>Chris Lew</name>
</author>
<published>2018-07-27T12:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=475452fca1ddd3fe196fb834d58ecfcb83d782a6'/>
<id>urn:sha1:475452fca1ddd3fe196fb834d58ecfcb83d782a6</id>
<content type='text'>
Channels may need to identify the edge their channel was probed for.
Store the edge name by reading the label property from device tree or
default to the node name.

Signed-off-by: Chris Lew &lt;clew@codeaurora.org&gt;
Signed-off-by: Arun Kumar Neelakantam &lt;aneela@codeaurora.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: glink: Fix various kerneldoc warnings.</title>
<updated>2018-07-31T06:21:53Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2018-06-18T12:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f0b9584275a5f7756182e0ac39af7bfde9fbf61'/>
<id>urn:sha1:6f0b9584275a5f7756182e0ac39af7bfde9fbf61</id>
<content type='text'>
Fix below kerneldoc warnings while building with W=1
qcom_glink_native.c:53: warning: Function parameter or member 'data' not described in 'glink_defer_cmd'
qcom_glink_native.c:75: warning: Function parameter or member 'data' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'id' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'size' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'reuse' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'in_use' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'offset' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'node' not described in 'glink_core_rx_intent'
qcom_glink_native.c:116: warning: Function parameter or member 'features' not described in 'qcom_glink'
qcom_glink_native.c:116: warning: Function parameter or member 'intentless' not described in 'qcom_glink'
qcom_glink_native.c:524: warning: Function parameter or member 'version' not described in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Function parameter or member 'features' not described in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Excess function parameter 'r_version' description in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Excess function parameter 'r_features' description in 'qcom_glink_receive_version'
qcom_glink_native.c:551: warning: Function parameter or member 'version' not described in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Function parameter or member 'features' not described in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Excess function parameter 'r_version' description in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Excess function parameter 'r_features' description in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:570: warning: bad line:                                       wire format and transmit
qcom_glink_native.c:604: warning: Function parameter or member 'intent' not described in 'qcom_glink_advertise_intent'
qcom_glink_native.c:604: warning: Excess function parameter 'size' description in 'qcom_glink_advertise_intent'
qcom_glink_native.c:710: warning: Function parameter or member 'glink' not described in 'qcom_glink_handle_intent_req'
qcom_glink_native.c:710: warning: Function parameter or member 'cid' not described in 'qcom_glink_handle_intent_req'
qcom_glink_native.c:710: warning: Function parameter or member 'size' not described in 'qcom_glink_handle_intent_req'

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
