All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH 0/8] spi: fix explicit controller deregistration
Date: Tue, 14 Apr 2026 15:43:11 +0200	[thread overview]
Message-ID: <20260414134319.978196-1-johan@kernel.org> (raw)

Turns out we have a few drivers that get the tear down ordering wrong
also when not using device managed registration (cf. [1] and [2]).

Fix this to avoid issues like system errors due to unclocked accesses,
NULL-pointer dereferences, hangs or failed I/O during during
deregistration (e.g. when powering down devices).

Johan


[1] https://lore.kernel.org/lkml/20260409120419.388546-2-johan@kernel.org/
[2] https://lore.kernel.org/lkml/20260410081757.503099-1-johan@kernel.org/


Johan Hovold (8):
  spi: cadence: fix controller deregistration
  spi: cadence-quadspi: fix controller deregistration
  spi: mpc52xx: fix controller deregistration
  spi: mpc52xx: fix use-after-free on unbind
  spi: mxic: fix controller deregistration
  spi: orion: fix controller deregistration
  spi: topcliff-pch: fix controller deregistration
  spi: topcliff-pch: fix use-after-free on unbind

 drivers/spi/spi-cadence-quadspi.c |  4 ++--
 drivers/spi/spi-cadence.c         |  6 +++++-
 drivers/spi/spi-mpc52xx.c         |  6 ++++--
 drivers/spi/spi-mxic.c            |  3 ++-
 drivers/spi/spi-orion.c           |  7 ++++++-
 drivers/spi/spi-topcliff-pch.c    | 11 ++++++++---
 6 files changed, 27 insertions(+), 10 deletions(-)

-- 
2.52.0


             reply	other threads:[~2026-04-14 13:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 13:43 Johan Hovold [this message]
2026-04-14 13:43 ` [PATCH 1/8] spi: cadence: fix controller deregistration Johan Hovold
2026-04-14 13:43 ` [PATCH 2/8] spi: cadence-quadspi: " Johan Hovold
2026-04-14 13:43 ` [PATCH 3/8] spi: mpc52xx: " Johan Hovold
2026-04-14 13:43 ` [PATCH 4/8] spi: mpc52xx: fix use-after-free on unbind Johan Hovold
2026-04-14 13:43 ` [PATCH 5/8] spi: mxic: fix controller deregistration Johan Hovold
2026-04-14 13:43 ` [PATCH 6/8] spi: orion: " Johan Hovold
2026-04-14 13:43 ` [PATCH 7/8] spi: topcliff-pch: " Johan Hovold
2026-04-14 13:43 ` [PATCH 8/8] spi: topcliff-pch: fix use-after-free on unbind Johan Hovold
2026-04-20 11:40 ` [PATCH 0/8] spi: fix explicit controller deregistration Mark Brown

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=20260414134319.978196-1-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.