Commit 8afa764
PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf()
stable inclusion
from stable-6.6.78
commit 97bc165a0686f044aa5b879da98faed780650702
category: bugfix
issue: #IC2PN8
CVE: NA
Signed-off-by: zyf1116 <[email protected]>
---------------------------------------
commit 3b9f942eb21c92041905e3943a8d5177c9a9d89d upstream.
When removing a virtual Endpoint, pci_epf_remove_vepf() failed to clear
epf_vf->epf_pf, which caused a subsequent pci_epf_add_vepf() to incorrectly
return -EBUSY:
pci_epf_add_vepf(epf_pf, epf_vf) // add
pci_epf_remove_vepf(epf_pf, epf_vf) // remove
pci_epf_add_vepf(epf_pf, epf_vf) // add again, -EBUSY error
Fix by clearing epf_vf->epf_pf in pci_epf_remove_vepf().
Link: https://lore.kernel.org/r/[email protected]
Fixes: 1cf362e ("PCI: endpoint: Add support to add virtual function in endpoint core")
Signed-off-by: Zijun Hu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: zyf1116 <[email protected]>1 parent be7caf6 commit 8afa764
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
0 commit comments