Date: Thu, 1 Aug 2024 22:27:33 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0ce38f6c0c82 - stable/14 - LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO Message-ID: <202408012227.471MRXt5027321@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0ce38f6c0c822af3b41d9eb63669acef57dd9af9 commit 0ce38f6c0c822af3b41d9eb63669acef57dd9af9 Author: Alvin Chen <weike.chen@dell.com> AuthorDate: 2024-06-06 20:42:06 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-08-01 21:09:39 +0000 LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO 'cond' in WARN_ON need be bracketed, otherwise it is wrong for multiple conditions. Reviewed by: wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44604 (cherry picked from commit 21f4cf5ccf87fd15d4d71f89d4c3ecab13f26146) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index a379e191aad7..5291be79218e 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -50,8 +50,8 @@ struct pin_cookie { #define lockdep_unregister_key(key) do { } while(0) #ifdef INVARIANTS -#define lockdep_assert(cond) do { WARN_ON(!cond); } while (0) -#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!cond); } while (0) +#define lockdep_assert(cond) do { WARN_ON(!(cond)); } while (0) +#define lockdep_assert_once(cond) do { WARN_ON_ONCE(!(cond)); } while (0) #define lockdep_assert_not_held(m) do { \ struct lock_object *__lock = (struct lock_object *)(m); \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408012227.471MRXt5027321>