git: a7b222db122e - main - linuxkpi: rwlock: Fix rwlock_init
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 May 2024 05:59:14 UTC
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a7b222db122e99f587d87eeec303c8abc9aea04e commit a7b222db122e99f587d87eeec303c8abc9aea04e Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2024-05-17 05:54:36 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-05-17 05:59:02 +0000 linuxkpi: rwlock: Fix rwlock_init Some linux code re-init some spinlock so add MTX_NEW to mtx_init. Reported by: rlibby Fixes: 5c0a1923486e ("linuxkpi: rwlock: Simplify code") --- sys/compat/linuxkpi/common/include/linux/rwlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/rwlock.h b/sys/compat/linuxkpi/common/include/linux/rwlock.h index 126b70c875c0..3030ec89ff1e 100644 --- a/sys/compat/linuxkpi/common/include/linux/rwlock.h +++ b/sys/compat/linuxkpi/common/include/linux/rwlock.h @@ -52,6 +52,6 @@ typedef struct rwlock rwlock_t; do { read_unlock(lock); } while (0) #define write_unlock_irqrestore(lock, flags) \ do { write_unlock(lock); } while (0) -#define rwlock_init(_l) rw_init_flags(_l, "lnxrw", RW_NOWITNESS) +#define rwlock_init(_l) rw_init_flags(_l, "lnxrw", RW_NOWITNESS | RW_NEW) #endif /* _LINUXKPI_LINUX_RWLOCK_H_ */