Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a441381c authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

spcom: fix deadlock when add/remove new channel



This change resolves following 2 deadlocks:

The register_rpmsg_drv() called under ch->lock. When newly created (by
rpmsg layer) rpmsg device probe arrives during the rpmsg driver is
registering - deadlock on channel lock occurs.

When channel is closing (by unregister_rpmsg_drv(), under ch->lock) this
causes call to spcom_rpdev_remove() for the rpmsg device (managed by
unregestered driver). The spcom_rpdev_remove() causes deadlock on ch->lock.

To resolve these deadlocks move register/unregister_rpmsg_drv() calls out
of the ch->lock.

Also, do not need to unregister_rpmsg_drv() on spcom_device_release() -
since SP side never initiates glink_close()

Change-Id: I77661f82f3719d1153483ef31f8ff9fef7fb99a3
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent d65289ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment