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

Commit 8d3d35bb authored by Imran Khan's avatar Imran Khan Committed by Rishabh Bhatnagar
Browse files

firmware_class: Avoid pending list corruption



Remove firmware buffer from pending list when it is freed.
Once the buffer is free kmalloc can allocate the same slab
object for some other user but as the buffer is still there
in the pending list, we end up with multiple users of the
same slab object using it in different contexts.

Change-Id: Id83afbd4416a82646f46b5015d983b9c63a2a613
Signed-off-by: default avatarImran Khan <kimran@codeaurora.org>
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent 63eeb69d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -244,6 +244,10 @@ static void __free_fw_priv(struct kref *ref)
		 (unsigned int)fw_priv->size);

	list_del(&fw_priv->list);
#ifdef CONFIG_FW_LOADER_USER_HELPER
	list_del(&fw_priv->pending_list);
#endif

	spin_unlock(&fwc->lock);

#ifdef CONFIG_FW_LOADER_USER_HELPER