mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Koichiro Den <den@valinux.co.jp>
Cc: linux-pci@vger.kernel.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: dwc: rcar-gen4: Fix potential unclocked access in rcar_gen4_pcie_ep_deinit()
Date: Thu, 20 Aug 2026 06:09:50 +0200	[thread overview]
Message-ID: <6dfc406f-0dd1-44a6-8277-e89f43c2853a@mailbox.org> (raw)
In-Reply-To: <h43onk4priskfkvdrheml4ttx2b7udavnulxvftj45midvcs3c@lec5rx7mrgys>

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

      parent reply	other threads:[~2026-08-20  4:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  9:18 Marek Vasut
2026-08-18  5:55 ` Koichiro Den
2026-08-18  6:57   ` Geert Uytterhoeven
2026-08-18 15:09     ` Koichiro Den
2026-08-19  6:28       ` Marek Vasut
2026-08-19  8:48         ` Koichiro Den
2026-08-20  3:52           ` Marek Vasut
2026-08-20  4:09   ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6dfc406f-0dd1-44a6-8277-e89f43c2853a@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=bhelgaas@google.com \
    --cc=den@valinux.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®