Skip to content
Commit 15fd943a authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen
Browse files

rpmsg: make sure inflight messages don't invoke just-removed callbacks



When inbound messages arrive, rpmsg core looks up their associated
endpoint (by destination address) and then invokes their callback.

We've made sure that endpoints will never be de-allocated after they
were found by rpmsg core, but we also need to protect against the
(rare) scenario where the rpmsg driver was just removed, and its
callback function isn't available anymore.

This is achieved by introducing a callback mutex, which must be taken
before the callback is invoked, and, obviously, before it is removed.

Cc: stable <stable@vger.kernel.org>
Reported-by: default avatarFernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
parent 5a081caa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment