linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] rpmsg: smd: Redeliver messages after probe
@ 2018-03-27 21:06 Bjorn Andersson
  2018-03-27 21:06 ` [PATCH 1/3] rpmsg: smd: Fix container_of macros Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bjorn Andersson @ 2018-03-27 21:06 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson
  Cc: linux-remoteproc, linux-kernel, linux-arm-msm

A race condition exists in SMD where incoming messages might be processed
before we've finished executing the rpmsg device's probe function. The driver's
callback function will in this case be unable to handle the incoming message
and might return an error.

Using the announce_create ops we can invoke the handler for incoming messages
once again after probe returns, solving this issue.

With SMD and QRTR this shows a high failure rate, but there are (at least
theoretical) similar issues in glink and virtio-rpmsg, so this needs to be
further investigated.

Bjorn Andersson (3):
  rpmsg: smd: Fix container_of macros
  rpmsg: Only invoke announce_create for rpdev with endpoints
  rpmsg: smd: Use announce_create to process any receive work

 drivers/rpmsg/qcom_smd.c   | 22 ++++++++++++++++++++--
 drivers/rpmsg/rpmsg_core.c |  2 +-
 2 files changed, 21 insertions(+), 3 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-10 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27 21:06 [PATCH 0/3] rpmsg: smd: Redeliver messages after probe Bjorn Andersson
2018-03-27 21:06 ` [PATCH 1/3] rpmsg: smd: Fix container_of macros Bjorn Andersson
2018-03-27 21:06 ` [PATCH 2/3] rpmsg: Only invoke announce_create for rpdev with endpoints Bjorn Andersson
2018-04-03  9:12   ` Loic PALLARDY
2018-04-10 18:27     ` Bjorn Andersson
2018-04-10  8:22   ` Loic PALLARDY
2018-03-27 21:06 ` [PATCH 3/3] rpmsg: smd: Use announce_create to process any receive work Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).