hulk inclusion category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/14259 CVE: CVE-2026-31527 -------------------------------- Fixes: 3ab76fa45467 ("driver core: generalize driver_override in struct device") Fixes: 8c379246416c ("driver core: platform: use generic driver_override infrastructure") Signed-off-by: Lin Ruifeng <linruifeng4@huawei.com> --- include/linux/device.h | 11 +++++++---- include/linux/device/bus.h | 2 +- include/linux/platform_device.h | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index a833c769bbf0..50e19dd78eb1 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -493,10 +493,6 @@ struct device { #ifdef CONFIG_PROVE_LOCKING struct mutex lockdep_mutex; #endif - struct { - const char *name; - spinlock_t lock; - } driver_override; struct mutex mutex; /* mutex to synchronize calls to * its driver. */ @@ -603,8 +599,15 @@ struct device { KABI_RESERVE(3) KABI_RESERVE(4) #endif +#ifndef __GENKSYMS__ + struct { + const char *name; + spinlock_t lock; + } driver_override; +#else KABI_RESERVE(5) KABI_RESERVE(6) +#endif KABI_RESERVE(7) KABI_RESERVE(8) KABI_RESERVE(9) diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index 4049a4518c74..d038b96d6b3c 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -114,8 +114,8 @@ struct bus_type { struct subsys_private *p; struct lock_class_key lock_key; - bool driver_override; bool need_parent_lock; + KABI_FILL_HOLE(bool driver_override) }; extern int __must_check bus_register(struct bus_type *bus); diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index a3d6fbd89a84..a2fe547b8dae 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -32,6 +32,8 @@ struct platform_device { const struct platform_device_id *id_entry; + KABI_DEPRECATE(char *, driver_override) + /* MFD cell pointer */ struct mfd_cell *mfd_cell; -- 2.43.0