lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a013d8f5-61b7-4cfc-a863-76084e974634@infradead.org>
Date: Fri, 30 May 2025 07:14:43 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
 kvm@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] rtmutex_api: remove definition of
 mutex_lock_killable_nested

Hi,

On 5/30/25 12:51 AM, Paolo Bonzini wrote:
> Commit fb49f07ba1d9 ("locking/mutex: implement mutex_lock_killable_nest_lock")
> removed the "extern" declaration of mutex_lock_killable_nested from
> include/linux/mutex.h, and replaced it with a macro since it could be
> treated as a special case of _mutex_lock_killable.  It also removed a
> definition of the function in kernel/locking/mutex.c.
> 
> However, it left the definition in place in kernel/locking/rtmutex_api.c,
> which causes a failure when building with CONFIG_RT_MUTEXES=y.  Drop it as
> well now.
> 
> Fixes: fb49f07ba1d9 ("locking/mutex: implement mutex_lock_killable_nest_lock")
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>

This patch fixes part of the build errors that I was seeing, but I
still have these:

In file included from ../include/uapi/linux/posix_types.h:5,
                 from ../include/uapi/linux/types.h:14,
                 from ../include/linux/types.h:6,
                 from ../include/linux/kasan-checks.h:5,
                 from ../include/asm-generic/rwonce.h:26,
                 from ./arch/x86/include/generated/asm/rwonce.h:1,
                 from ../include/linux/compiler.h:390,
                 from ../include/linux/export.h:5,
                 from ../include/linux/linkage.h:7,
                 from ../include/linux/preempt.h:10,
                 from ../include/linux/spinlock.h:56,
                 from ../kernel/locking/rtmutex_api.c:5:
../include/linux/stddef.h:8:14: error: expected declaration specifiers or ‘...’ before ‘(’ token
    8 | #define NULL ((void *)0)
      |              ^
../include/linux/mutex.h:215:60: note: in expansion of macro ‘NULL’
  215 | #define mutex_trylock(lock) _mutex_trylock_nest_lock(lock, NULL)
      |                                                            ^~~~
../kernel/locking/rtmutex_api.c:589:13: note: in expansion of macro ‘mutex_trylock’
  589 | int __sched mutex_trylock(struct mutex *lock)
      |             ^~~~~~~~~~~~~
../kernel/locking/rtmutex_api.c:602:15: error: ‘mutex_trylock’ undeclared here (not in a function); did you mean ‘ww_mutex_trylock’?
  602 | EXPORT_SYMBOL(mutex_trylock);
      |               ^~~~~~~~~~~~~
../include/linux/export.h:76:23: note: in definition of macro ‘__EXPORT_SYMBOL’
   76 |         extern typeof(sym) sym;                                 \
      |                       ^~~
../include/linux/export.h:89:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
   89 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
      |                                         ^~~~~~~~~~~~~~
../kernel/locking/rtmutex_api.c:602:1: note: in expansion of macro ‘EXPORT_SYMBOL’
  602 | EXPORT_SYMBOL(mutex_trylock);
      | ^~~~~~~~~~~~~



> ---
>  kernel/locking/rtmutex_api.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c
> index 191e4720e546..0c26b52dd417 100644
> --- a/kernel/locking/rtmutex_api.c
> +++ b/kernel/locking/rtmutex_api.c
> @@ -544,13 +544,6 @@ int __sched mutex_lock_interruptible_nested(struct mutex *lock,
>  }
>  EXPORT_SYMBOL_GPL(mutex_lock_interruptible_nested);
>  
> -int __sched mutex_lock_killable_nested(struct mutex *lock,
> -					    unsigned int subclass)
> -{
> -	return __mutex_lock_common(lock, TASK_KILLABLE, subclass, NULL, _RET_IP_);
> -}
> -EXPORT_SYMBOL_GPL(mutex_lock_killable_nested);
> -
>  void __sched mutex_lock_io_nested(struct mutex *lock, unsigned int subclass)
>  {
>  	int token;

-- 
~Randy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ