git: cff79fd02636 - main - linuxkpi: Fix spin_lock_init
Date: Fri, 17 May 2024 05:59:13 UTC
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cff79fd02636f34010d8b835cc9e55401fa76e74 commit cff79fd02636f34010d8b835cc9e55401fa76e74 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2024-05-17 04:52:53 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-05-17 05:58:59 +0000 linuxkpi: Fix spin_lock_init Some linux code re-init some spinlock so add MTX_NEW to mtx_init. Reported by: David Wolfskill <david@catwhisker.org> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code") --- sys/compat/linuxkpi/common/include/linux/spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index 3f6eb4bb70f6..2992e41c9c02 100644 --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h @@ -140,7 +140,7 @@ typedef struct mtx spinlock_t; #define spin_lock_name(name) _spin_lock_name(name, __FILE__, __LINE__) #define spin_lock_init(lock) mtx_init(lock, spin_lock_name("lnxspin"), \ - NULL, MTX_DEF | MTX_NOWITNESS) + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) #define spin_lock_destroy(_l) mtx_destroy(_l)