diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2024-05-17 05:54:36 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2024-05-17 05:59:02 +0000 |
commit | a7b222db122e99f587d87eeec303c8abc9aea04e (patch) | |
tree | cf0ed553873c3d24852708311a1f6d31de73a9dc /sys | |
parent | cff79fd02636f34010d8b835cc9e55401fa76e74 (diff) | |
download | src-a7b222db122e99f587d87eeec303c8abc9aea04e.tar.gz src-a7b222db122e99f587d87eeec303c8abc9aea04e.zip |
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")
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/rwlock.h | 2 |
1 files changed, 1 insertions, 1 deletions
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_ */ |