tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 5c63bd0fa5e86474d30ecd06d67f2393de081434
commit: 1073f9d006321689fb82bdac7b7af58e8617f128 [5053/23811] platform/x86: Add Intel AtomISP2 dummy / power-management driver
config: x86_64-buildonly-randconfig-004-20240923 (https://download.01.org/0day-ci/archive/20241001/202410010410.oqbogdcw-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241001/202410010410.oqbogdcw-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410010410.oqbogdcw-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/platform/x86/intel_atomisp2_pm.c:15:
include/linux/module.h:140:14: warning: 'cleanup_module' specifies less restrictive attribute than its target 'isp_pci_driver_exit': 'cold' [-Wmissing-attributes]
140 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
include/linux/device.h:1637:1: note: in expansion of macro 'module_exit'
1637 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/pci.h:1335:9: note: in expansion of macro 'module_driver'
1335 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver'
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/pci.h:32,
from drivers/platform/x86/intel_atomisp2_pm.c:17:
drivers/platform/x86/intel_atomisp2_pm.c:115:19: note: 'cleanup_module' target declared here
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~
include/linux/device.h:1633:20: note: in definition of macro 'module_driver'
1633 | static void __exit __driver##_exit(void) \
| ^~~~~~~~
drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver'
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~~~~
include/linux/module.h:134:13: warning: 'init_module' specifies less restrictive attribute than its target 'isp_pci_driver_init': 'cold' [-Wmissing-attributes]
134 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/device.h:1632:1: note: in expansion of macro 'module_init'
1632 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/pci.h:1335:9: note: in expansion of macro 'module_driver'
1335 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver'
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~~~~
drivers/platform/x86/intel_atomisp2_pm.c:115:19: note: 'init_module' target declared here
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~
include/linux/device.h:1628:19: note: in definition of macro 'module_driver'
1628 | static int __init __driver##_init(void) \
| ^~~~~~~~
drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver'
115 | module_pci_driver(isp_pci_driver);
| ^~~~~~~~~~~~~~~~~
>> drivers/platform/x86/.tmp_intel_atomisp2_pm.o: warning: objtool: missing symbol for section .init.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: c594039dbf93789c67e3d7fe031bada7b7fc8aae
commit: f27f159f8a8867f846422bb8f1e0f01ff1803bf0 [7330/14264] RNPGBE: NET: Fix wanrings
config: loongarch-randconfig-001-20240930 (https://download.01.org/0day-ci/archive/20240930/202409301900.jvcSphIC-lkp@…)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409301900.jvcSphIC-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409301900.jvcSphIC-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/mucse/rnpgbe/rnpgbe_sriov.c:301:13: warning: 'check_ari_mode' defined but not used [-Wunused-function]
301 | static bool check_ari_mode(struct pci_dev *dev)
| ^~~~~~~~~~~~~~
vim +/check_ari_mode +301 drivers/net/ethernet/mucse/rnpgbe/rnpgbe_sriov.c
300
> 301 static bool check_ari_mode(struct pci_dev *dev)
302 {
303 struct pci_bus *bus = dev->bus;
304
305 return bus->self && bus->self->ari_enabled;
306 }
307
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
From: Roland Xu <mu001999(a)outlook.com>
stable inclusion
from stable-v4.19.322
commit 432efdbe7da5ecfcbc0c2180cfdbab1441752a38
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9M4
CVE: CVE-2024-46829
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit d33d26036a0274b472299d7dcdaa5fb34329f91b upstream.
rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held. In the
good case it returns with the lock held and in the deadlock case it emits a
warning and goes into an endless scheduling loop with the lock held, which
triggers the 'scheduling in atomic' warning.
Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
and dropping into the schedule for ever loop.
[ tglx: Moved unlock before the WARN(), removed the pointless comment,
massaged changelog, added Fixes tag ]
Fixes: 3d5c9340d194 ("rtmutex: Handle deadlock detection smarter")
Signed-off-by: Roland Xu <mu001999(a)outlook.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300M…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com>
---
kernel/locking/rtmutex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 861e14ce1956..dffa14dee033 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1241,6 +1241,7 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
}
static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
+ struct rt_mutex *lock,
struct rt_mutex_waiter *w)
{
/*
@@ -1250,6 +1251,7 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
if (res != -EDEADLOCK || detect_deadlock)
return;
+ raw_spin_unlock_irq(&lock->wait_lock);
/*
* Yell lowdly and stop the task right here.
*/
@@ -1305,7 +1307,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
if (unlikely(ret)) {
__set_current_state(TASK_RUNNING);
remove_waiter(lock, &waiter);
- rt_mutex_handle_deadlock(ret, chwalk, &waiter);
+ rt_mutex_handle_deadlock(ret, chwalk, lock, &waiter);
}
/*
--
2.20.1
From: Roland Xu <mu001999(a)outlook.com>
stable inclusion
from stable-v5.10.226
commit 1401da1486dc1cdbef6025fd74a3977df3a3e5d0
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9M4
CVE: CVE-2024-46829
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit d33d26036a0274b472299d7dcdaa5fb34329f91b upstream.
rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held. In the
good case it returns with the lock held and in the deadlock case it emits a
warning and goes into an endless scheduling loop with the lock held, which
triggers the 'scheduling in atomic' warning.
Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
and dropping into the schedule for ever loop.
[ tglx: Moved unlock before the WARN(), removed the pointless comment,
massaged changelog, added Fixes tag ]
Fixes: 3d5c9340d194 ("rtmutex: Handle deadlock detection smarter")
Signed-off-by: Roland Xu <mu001999(a)outlook.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300M…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com>
---
kernel/locking/rtmutex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 9d24d2263a863..b909b559a36f4 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1220,6 +1220,7 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
}
static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
+ struct rt_mutex *lock,
struct rt_mutex_waiter *w)
{
/*
@@ -1229,6 +1230,7 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
if (res != -EDEADLOCK || detect_deadlock)
return;
+ raw_spin_unlock_irq(&lock->wait_lock);
/*
* Yell lowdly and stop the task right here.
*/
@@ -1284,7 +1286,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
if (unlikely(ret)) {
__set_current_state(TASK_RUNNING);
remove_waiter(lock, &waiter);
- rt_mutex_handle_deadlock(ret, chwalk, &waiter);
+ rt_mutex_handle_deadlock(ret, chwalk, lock, &waiter);
}
/*
--
2.20.1
From: Roland Xu <mu001999(a)outlook.com>
stable inclusion
from stable-v5.10.226
commit 1401da1486dc1cdbef6025fd74a3977df3a3e5d0
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9M4
CVE: CVE-2024-46829
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit d33d26036a0274b472299d7dcdaa5fb34329f91b upstream.
rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held. In the
good case it returns with the lock held and in the deadlock case it emits a
warning and goes into an endless scheduling loop with the lock held, which
triggers the 'scheduling in atomic' warning.
Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
and dropping into the schedule for ever loop.
[ tglx: Moved unlock before the WARN(), removed the pointless comment,
massaged changelog, added Fixes tag ]
Fixes: 3d5c9340d194 ("rtmutex: Handle deadlock detection smarter")
Signed-off-by: Roland Xu <mu001999(a)outlook.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300M…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com>
---
kernel/locking/rtmutex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index a82d1176e7c6a..7bce39e7fec0e 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1184,6 +1184,7 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
}
static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
+ struct rt_mutex *lock,
struct rt_mutex_waiter *w)
{
/*
@@ -1193,6 +1194,7 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
if (res != -EDEADLOCK || detect_deadlock)
return;
+ raw_spin_unlock_irq(&lock->wait_lock);
/*
* Yell lowdly and stop the task right here.
*/
@@ -1248,7 +1250,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
if (unlikely(ret)) {
__set_current_state(TASK_RUNNING);
remove_waiter(lock, &waiter);
- rt_mutex_handle_deadlock(ret, chwalk, &waiter);
+ rt_mutex_handle_deadlock(ret, chwalk, lock, &waiter);
}
/*
--
2.20.1
From: Roland Xu <mu001999(a)outlook.com>
stable inclusion
from stable-v6.6.51
commit 85f03ca98e07cd0786738b56ae73740bce0ac27f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9M4
CVE: CVE-2024-46829
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit d33d26036a0274b472299d7dcdaa5fb34329f91b upstream.
rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held. In the
good case it returns with the lock held and in the deadlock case it emits a
warning and goes into an endless scheduling loop with the lock held, which
triggers the 'scheduling in atomic' warning.
Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
and dropping into the schedule for ever loop.
[ tglx: Moved unlock before the WARN(), removed the pointless comment,
massaged changelog, added Fixes tag ]
Fixes: 3d5c9340d194 ("rtmutex: Handle deadlock detection smarter")
Signed-off-by: Roland Xu <mu001999(a)outlook.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300M…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com>
---
kernel/locking/rtmutex.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 21db0df0eb00..bf3a28ee7d8f 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1624,6 +1624,7 @@ static int __sched rt_mutex_slowlock_block(struct rt_mutex_base *lock,
}
static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock,
+ struct rt_mutex_base *lock,
struct rt_mutex_waiter *w)
{
/*
@@ -1636,10 +1637,10 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock,
if (build_ww_mutex() && w->ww_ctx)
return;
- /*
- * Yell loudly and stop the task right here.
- */
+ raw_spin_unlock_irq(&lock->wait_lock);
+
WARN(1, "rtmutex deadlock detected\n");
+
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
@@ -1693,7 +1694,7 @@ static int __sched __rt_mutex_slowlock(struct rt_mutex_base *lock,
} else {
__set_current_state(TASK_RUNNING);
remove_waiter(lock, waiter);
- rt_mutex_handle_deadlock(ret, chwalk, waiter);
+ rt_mutex_handle_deadlock(ret, chwalk, lock, waiter);
}
/*
--
2.20.1