Skip to contentSkip to conversation

Driver core fixes for 7.0-rc5

GIT PULL Merged Danilo Krummrich 3 participants 4 messages Mar 21 – Mar 22

Subsystems (2)
lore
Share & tools
lore

Danilo Krummrich

author maintainer
#0 lore raw

Hi Linus,

Please pull these driver-core fixes.

All commits have been in linux-next for a couple rounds; no conflicts expected.

(I will send out fixes for the remaining busses subsequently, so they can reach you through the corresponding subsystem trees -- treewide commit [1] for reference.)

- Danilo

[1] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/commit/?h=driver_override&id=7144511c6614967b4c16b716a9674b12c4e7f2b9

The following changes since commit f338e77383789c0cae23ca3d48adcc5e9e137e3c:

Linux 7.0-rc4 (2026-03-15 13:52:05 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git tags/driver-core-7.0-rc5

for you to fetch changes up to 2b38efc05bf7a8568ec74bfffea0f5cfa62bc01d:

driver core: platform: use generic driver_override infrastructure (2026-03-17 20:30:57 +0100)

----------------------------------------------------------------
Driver core fixes for 7.0-rc5

- Generalize driver_override in the driver core, providing a common sysfs implementation and concurrency-safe accessors for bus implementations

- Do not use driver_override as IRQ name in the hwmon axi-fan driver

- Remove an unnecessary driver_override check in sh platform_early

- Migrate the platform bus to use the generic driver_override infrastructure, fixing a UAF condition caused by accessing the driver_override field without proper locking in the platform_match() callback

----------------------------------------------------------------
Danilo Krummrich (5):
driver core: generalize driver_override in struct device
docs: driver-model: document driver_override
hwmon: axi-fan: don't use driver_override as IRQ name
sh: platform_early: remove pdev->driver_override check driver core: platform: use generic driver_override infrastructure

 Documentation/driver-api/driver-model/binding.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 arch/sh/drivers/platform_early.c                  |  4 ----
 drivers/base/bus.c                                | 43 ++++++++++++++++++++++++++++++++++++++++++-
 drivers/base/core.c                               |  2 ++
 drivers/base/dd.c                                 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/base/platform.c                           | 37 +++++--------------------------------
 drivers/bus/simple-pm-bus.c                       |  4 ++--
 drivers/clk/imx/clk-scu.c                         |  3 +--
 drivers/hwmon/axi-fan-control.c                   |  2 +-
 drivers/slimbus/qcom-ngd-ctrl.c                   |  6 ++----
 include/linux/device.h                            | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/device/bus.h                        |  4 ++++
 include/linux/platform_device.h                   |  5 -----
 sound/soc/samsung/i2s.c                           |  6 +++---
 14 files changed, 224 insertions(+), 54 deletions(-)
#1 lore raw
Quoted 4 lines · Danilo Krummrich

(I will send out fixes for the remaining busses subsequently, so they can reach you through the corresponding subsystem trees -- treewide commit [1] for reference.)

I'm not convinced there are advantages to going through individual trees - these are just buses working around driver core interface issues, not some "bus X does bus X things".

That said, I'm also not convinced this is all really -rc material in the first place. This issue is neither new nor does the UAF seem to be triggerable in any actual realistic scenario, and requires root privileges to trigger even in the unrealistic case.

IOW, why isn't this just left until the next merge window? And then done as a "just clean everything up" instead of trying to push things through individual driver trees that almost certainly don't care about this anyway?

Linus

author maintainer
#2 lore raw
Quoted 3 lines · Linus Torvalds

I'm not convinced there are advantages to going through individual trees - these are just buses working around driver core interface issues, not some "bus X does bus X things".

I figured it could be a bit safer to let subsystems pick things up themselves at their own pace, as two of those stand out a bit.

SPI and AP explicitly print "\n" when driver_override is not set, whereas all other buses always pass the pointer directly to sysfs_emit(), which results in "(null)\n" instead.

AP also has a custom driver_override counter, which is updated in the sysfs store() callback.

Quoted 4 lines

That said, I'm also not convinced this is all really -rc material in the first place. This issue is neither new nor does the UAF seem to be triggerable in any actual realistic scenario, and requires root privileges to trigger even in the unrealistic case.

I don't disagree; the reason I sent this regardless is that we already had a (simpler) fix in place that we reverted in -rc3, so I figured it is not unreasonable to follow this up right away.

I think none of the above are strong reasons though (i.e. the fact we already had a fix in place does not make the underlying issue any more urgent).

That said, deferring until the merge window seems fair.

- Danilo

merge bot Merged
#3 lore raw
In reply to Danilo Krummrich
The pull request you sent on Sat, 21 Mar 2026 23:46:06 +0100:

The pull request you sent on Sat, 21 Mar 2026 23:46:06 +0100:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git tags/driver-core-7.0-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d723091c8c3e076bb53d52ec3d5a801d49f30caf

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html