<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/rpmsg, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/rpmsg?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/rpmsg?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-21T17:21:33Z</updated>
<entry>
<title>rpmsg: char: Avoid double destroy of default endpoint</title>
<updated>2022-09-21T17:21:33Z</updated>
<author>
<name>Shengjiu Wang</name>
<email>shengjiu.wang@nxp.com</email>
</author>
<published>2022-09-21T01:58:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=467233a4ac29b215d492843d067a9f091e6bf0c5'/>
<id>urn:sha1:467233a4ac29b215d492843d067a9f091e6bf0c5</id>
<content type='text'>
The rpmsg_dev_remove() in rpmsg_core is the place for releasing
this default endpoint.

So need to avoid destroying the default endpoint in
rpmsg_chrdev_eptdev_destroy(), this should be the same as
rpmsg_eptdev_release(). Otherwise there will be double destroy
issue that ept-&gt;refcount report warning:

refcount_t: underflow; use-after-free.

Call trace:
 refcount_warn_saturate+0xf8/0x150
 virtio_rpmsg_destroy_ept+0xd4/0xec
 rpmsg_dev_remove+0x60/0x70

The issue can be reproduced by stopping remoteproc before
closing the /dev/rpmsgX.

Fixes: bea9b79c2d10 ("rpmsg: char: Add possibility to use default endpoint of the rpmsg device")
Signed-off-by: Shengjiu Wang &lt;shengjiu.wang@nxp.com&gt;
Reviewed-by: Arnaud Pouliquen &lt;arnaud.pouliquen@foss.st.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/1663725523-6514-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: char: Remove the unneeded result variable</title>
<updated>2022-09-02T19:25:47Z</updated>
<author>
<name>ye xingchen</name>
<email>ye.xingchen@zte.com.cn</email>
</author>
<published>2022-08-26T07:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=06564be4c03ff0e0b88c5a4a14a6527fcb070ffd'/>
<id>urn:sha1:06564be4c03ff0e0b88c5a4a14a6527fcb070ffd</id>
<content type='text'>
Return the value rpmsg_chrdev_eptdev_add() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: ye xingchen &lt;ye.xingchen@zte.com.cn&gt;
Link: https://lore.kernel.org/r/20220826071954.252485-1-ye.xingchen@zte.com.cn
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: convert sysfs snprintf to sysfs_emit</title>
<updated>2022-07-17T04:08:47Z</updated>
<author>
<name>Xuezhi Zhang</name>
<email>zhangxuezhi1@coolpad.com</email>
</author>
<published>2022-06-07T12:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7113ac825371c17c15e2d0be79d850e5e16d3328'/>
<id>urn:sha1:7113ac825371c17c15e2d0be79d850e5e16d3328</id>
<content type='text'>
Fix the following coccicheck warning:
drivers/rpmsg/qcom_glink_native.c:1677:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang &lt;zhangxuezhi1@coolpad.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220607120649.78436-1-zhangxuezhi1@coolpad.com
</content>
</entry>
<entry>
<title>rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge</title>
<updated>2022-07-17T03:15:40Z</updated>
<author>
<name>Miaoqian Lin</name>
<email>linmq006@gmail.com</email>
</author>
<published>2022-05-11T12:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=65382585f067d4256ba087934f30f85c9b6984de'/>
<id>urn:sha1:65382585f067d4256ba087934f30f85c9b6984de</id>
<content type='text'>
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.

Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220511120737.57374-1-linmq006@gmail.com
</content>
</entry>
<entry>
<title>rpmsg: qcom: correct kerneldoc</title>
<updated>2022-07-17T03:13:32Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2022-05-19T07:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=101042f4c0eb2daa331b4f7ce32c6d547114830a'/>
<id>urn:sha1:101042f4c0eb2daa331b4f7ce32c6d547114830a</id>
<content type='text'>
Correct kerneldoc warnings like:

  drivers/rpmsg/qcom_glink_ssr.c:45:
    warning: expecting prototype for G(). Prototype was for GLINK_SSR_DO_CLEANUP() instead

Also fix meaning of 'flag' argument.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220519073330.7187-3-krzysztof.kozlowski@linaro.org
</content>
</entry>
<entry>
<title>rpmsg: qcom: glink: remove unused name</title>
<updated>2022-07-17T03:13:32Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2022-05-19T07:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c3ebc96ffefbc48297d7c2fd266e9cb78e6941e'/>
<id>urn:sha1:6c3ebc96ffefbc48297d7c2fd266e9cb78e6941e</id>
<content type='text'>
The qcom_glink.name is read from DTS but never used further, never
referenced, so drop it.  This also fixes kerneldoc warning:

  drivers/rpmsg/qcom_glink_native.c:125:
    warning: Function parameter or member 'name' not described in 'qcom_glink'

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220519073330.7187-2-krzysztof.kozlowski@linaro.org
</content>
</entry>
<entry>
<title>rpmsg: qcom: glink: replace strncpy() with strscpy_pad()</title>
<updated>2022-07-17T03:13:32Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2022-05-19T07:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=766279a8f85df32345dbda03b102ca1ee3d5ddea'/>
<id>urn:sha1:766279a8f85df32345dbda03b102ca1ee3d5ddea</id>
<content type='text'>
The use of strncpy() is considered deprecated for NUL-terminated
strings[1]. Replace strncpy() with strscpy_pad(), to keep existing
pad-behavior of strncpy, similarly to commit 08de420a8014 ("rpmsg:
glink: Replace strncpy() with strscpy_pad()").  This fixes W=1 warning:

  In function ‘qcom_glink_rx_close’,
    inlined from ‘qcom_glink_work’ at ../drivers/rpmsg/qcom_glink_native.c:1638:4:
  drivers/rpmsg/qcom_glink_native.c:1549:17: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
   1549 |                 strncpy(chinfo.name, channel-&gt;name, sizeof(chinfo.name));

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220519073330.7187-1-krzysztof.kozlowski@linaro.org
</content>
</entry>
<entry>
<title>rpmsg: Strcpy is not safe, use strscpy_pad() instead</title>
<updated>2022-06-24T17:37:00Z</updated>
<author>
<name>Saud Farooqui</name>
<email>farooqui_saud@hotmail.com</email>
</author>
<published>2022-06-23T09:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=99de6509c4135f1d1ceb98c42fa02d249b28b40f'/>
<id>urn:sha1:99de6509c4135f1d1ceb98c42fa02d249b28b40f</id>
<content type='text'>
Replace strcpy() with strscpy_pad() for copying the rpmsg
device name in rpmsg_register_device_override().

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Saud Farooqui &lt;farooqui_saud@hotmail.com&gt;
Link: https://lore.kernel.org/r/PA4P189MB14210AA95DCA3715AFA7F4A68BB59@PA4P189MB1421.EURP189.PROD.OUTLOOK.COM
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: Fix possible refcount leak in rpmsg_register_device_override()</title>
<updated>2022-06-24T17:34:00Z</updated>
<author>
<name>Hangyu Hua</name>
<email>hbh25y@gmail.com</email>
</author>
<published>2022-06-24T02:41:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d7bd416d35121c95fe47330e09a5c04adbc5f928'/>
<id>urn:sha1:d7bd416d35121c95fe47330e09a5c04adbc5f928</id>
<content type='text'>
rpmsg_register_device_override need to call put_device to free vch when
driver_set_override fails.

Fix this by adding a put_device() to the error path.

Fixes: bb17d110cbf2 ("rpmsg: Fix calling device_lock() on non-initialized device")
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Hangyu Hua &lt;hbh25y@gmail.com&gt;
Link: https://lore.kernel.org/r/20220624024120.11576-1-hbh25y@gmail.com
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: Fix parameter naming for announce_create/destroy ops</title>
<updated>2022-06-24T16:58:12Z</updated>
<author>
<name>Arnaud Pouliquen</name>
<email>arnaud.pouliquen@foss.st.com</email>
</author>
<published>2022-04-25T07:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=416b992b05c94cd691a1909f10e333f02cb81e56'/>
<id>urn:sha1:416b992b05c94cd691a1909f10e333f02cb81e56</id>
<content type='text'>
The parameter associated to the announce_create and
announce_destroy ops functions is not an endpoint but a rpmsg device.

Signed-off-by: Arnaud Pouliquen &lt;arnaud.pouliquen@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220425071723.774050-1-arnaud.pouliquen@foss.st.com
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
</content>
</entry>
</feed>
