pci: pci-msm: Prevent double free of default state
In the case of a linkdown during pm_suspend, the
pci_saved_state during enumeration(default_state) is
used to restore config space. But this state is freed up
during pm_resume as part of pm_load_and_free_saved_state.
And if this state (default_state) is used again in case
of another linkdown, this leads to use after free.
Fix this by using a copy of the default_state instead
of the original copy for restoring config space incase
of a linkdown.
Change-Id: I6ac763ed88341c739f0b26992d1e31bf2513fdab
Signed-off-by:
Sriharsha Allenki <sallenki@codeaurora.org>
Loading
Please register or sign in to comment