Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f62b8540 authored by Jeff Hugo's avatar Jeff Hugo
Browse files

soc: qcom: glink_smd_xprt: Cleanup current intent reference at SSR



If a packet is partially processed, a reference to the related intent is
kept in the channel for completing the packet processing at a later time.
This reference is not cleaned up during SSR, which may cause the stale
reference to be incorrectly used after SSR, which could result in a crash.

Clean up the reference in SSR when it becomes invalid to prevent incorrect
behavior post-SSR.

CRs-Fixed: 901294
Change-Id: Ifb0df3a4fbacbd2a40bfc8bed1921808c5e23128
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent d96b4bb7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1383,6 +1383,8 @@ static int ssr(struct glink_transport_if *if_ptr)
			list_del(&intent->node);
			kfree(intent);
		}
		kfree(ch->cur_intent);
		ch->cur_intent = NULL;
		spin_unlock_irqrestore(&ch->intents_lock, flags);
		ch->is_closing = false;
		spin_lock_irqsave(&einfo->channels_lock, flags);