mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Reid Downing (b1nv0id)" <skibletz@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memory: fsl_ifc: fix stale global pointer on probe failure/remove
Date: Sat, 17 Oct 2026 16:51:49 +0200	[thread overview]
Message-ID: <dac4c920-fd0d-4246-94ba-66c790ec9f6a@kernel.org> (raw)
In-Reply-To: <20261017102423.1840590-1-skibletz@gmail.com>

On 17/10/2026 12:24, Reid Downing (b1nv0id) wrote:
> fsl_ifc_ctrl_dev is a global pointer. It was set at the start of
> fsl_ifc_ctrl_probe(), before anything could fail. If probe failed
> partway through, or the device was later removed, the global was
> never cleared. fsl_ifc_find() only checks it for non-NULL, so it
> could end up dereferencing freed memory or an unmapped register
> region.
> 
> Use a local variable while setting up the controller struct in
> probe, and only publish it to the global once probe has fully
> succeeded. Clear the global as the first step of remove, before
> any teardown runs. Also guard the free_irq() of the optional
> nand_irq, which may be zero.
> 
> Signed-off-by: Reid Downing (b1nv0id) <skibletz@gmail.com>

Please use real identity and skip custom names. See submitting patches
documents if in doubts.

I received two patches from you - please version them correctly, e.g.
use b4, plus changelog under ---.


> ---
> diff --git a/fsl_ifc.c b/fsl_ifc.c
> index e89e0c6..ff52cae 100644
> --- a/fsl_ifc.c
> +++ b/fsl_ifc.c

I don't think you use git... Why? This cannot be applied. Or you just
send LLM slop.

Best regards,
Krzysztof

  reply	other threads:[~2026-10-17 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 10:24 Reid Downing (b1nv0id)
2026-10-17 14:51 ` Krzysztof Kozlowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-17 10:09 Reid D

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=dac4c920-fd0d-4246-94ba-66c790ec9f6a@kernel.org \
    --to=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skibletz@gmail.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®