summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2012-06-06 07:09:25 (GMT)
committerOhad Ben-Cohen <ohad@wizery.com>2012-07-04 08:51:42 (GMT)
commit5a081caa0414b9bbb82c17ffab9d6fe66edbb72f (patch)
treede3c3d2044db5843e836690732a4f688985e35af /samples
parent6887a4131da3adaab011613776d865f4bcfb5678 (diff)
downloadlinux-fsl-qoriq-5a081caa0414b9bbb82c17ffab9d6fe66edbb72f.tar.xz
rpmsg: avoid premature deallocation of endpoints
When an inbound message arrives, the rpmsg core looks up its associated endpoint and invokes the registered callback. If a message arrives while its endpoint is being removed (because the rpmsg driver was removed, or a recovery of a remote processor has kicked in) we must ensure atomicity, i.e.: - Either the ept is removed before it is found or - The ept is found but will not be freed until the callback returns This is achieved by maintaining a per-ept reference count, which, when drops to zero, will trigger deallocation of the ept. With this in hand, it is now forbidden to directly deallocate epts once they have been added to the endpoints idr. Cc: stable <stable@vger.kernel.org> Reported-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions