rpmsg: glink: Remove dynamic intents from local intent list

For rx done invoked from clients dynamically allocated intents
are not being removed from idr database, this can result in reallocation
of stale intents.

Remove dynamically allocated intents from local intent list when
rx done called from client.

Change-Id: I0b1d5bf270a5cb1180964f4bfe26c6099f522c45
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
This commit is contained in:
Pranav Mahesh Phansalkar 2023-10-12 12:21:52 +05:30
parent 2682252ef2
commit c6d80fb03d

View File

@ -777,6 +777,9 @@ int qcom_glink_rx_done(struct rpmsg_endpoint *ept, void *data)
list_for_each_entry_safe(intent, tmp, &channel->defer_intents, node) {
if (intent->data == data) {
list_del(&intent->node);
if (!intent->reuse)
idr_remove(&channel->liids, intent->id);
spin_unlock_irqrestore(&channel->intent_lock, flags);
qcom_glink_send_rx_done(glink, channel, intent, true);