From: Ohad Ben-Cohen Date: Thu, 7 Jun 2012 12:39:35 +0000 (+0300) Subject: rpmsg: make sure inflight messages don't invoke just-removed callbacks X-Git-Tag: v3.5-rc7~40^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15fd943af50dbc5f7f4de33835795c72595f7bf4;p=pandora-kernel.git 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 Reported-by: Fernando Guzman Lugo Signed-off-by: Ohad Ben-Cohen --- Reading git-diff-tree failed