Re: [PATCH] PCI: dwc: rcar-gen4: Fix potential unclocked access in rcar_gen4_pcie_ep_deinit()
Marek Vasut <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <[email protected]> |
On 8/18/26 7:55 AM, Koichiro Den wrote: Hello Den-san, > 2. It seems to me dw_pcie_ep_init() can fail: > - before pre_init() has run, > - from inside common_init(), or > - after pre_init() has succeeded and written PCIEDMAINTSTSEN_INIT (e.g. > pci_epc_mem_init() fails) > > The caller cannot tell which case returned the error. In the first case, > common_init() has not run, while in the last case PCIEDMAINTSTSEN is not 0. > So this seems to me different from what the commit message says. Is > common_deinit() intended to be safe in all three cases? I hope this is addressed by the introduction of .post_deinit() callback, which makes the endpoint deinit safe in all cases. The commit message was poorly written, and is rewritten since. -- Best regards, Marek Vasut