Commits
Suman Anna committed 3802adf983f
rpmsg: rpc: fix ept memory leak during recovery The rpmsg-rpc driver exposes a character device for each remote service (a rpmsg-rpc device) providing a bunch of remote execution functions. An endpoint is created in the open() fops, and forms the source end-point of a dedicated communication channel to allow an application to send and receive remote function execution commands/ responses on this service. This endpoint address is a child of the parent virtio device to which the rpmsg-rpc device belongs to. The virtio devices are deleted and recreated during a remoteproc crash and recovery process. The associated child endpoints are not deleted at present during recovery, and the corresponding release() cannot delete the end-points if it happens after a recovery as the parent rpmsg-rpc device has already been removed, thereby resulting in a memory leak during recovery amidst an active usage. Fix this by deleting all the epts associated with the parent virtio device of the corresponding rpmsg-rpc device. This is done during the rpmsg-rpc driver's .remove() which is invoked during the deletion of the virtio device. Signed-off-by: Suman Anna <s-anna@ti.com>