@@ -130,7 +130,9 @@ extern int __percpu_init_rwsem(struct percpu_rw_semaphore *,
static inline void percpu_rwsem_release(struct percpu_rw_semaphore *sem,
bool read, unsigned long ip)
{
+#ifndef CONFIG_DEBUG_AID_FOR_SYZBOT
lock_release(&sem->rw_sem.dep_map, 1, ip);
+#endif
#ifdef CONFIG_RWSEM_SPIN_ON_OWNER
if (!read)
sem->rw_sem.owner = RWSEM_OWNER_UNKNOWN;
@@ -140,7 +142,9 @@ static inline void percpu_rwsem_release(struct percpu_rw_semaphore *sem,
static inline void percpu_rwsem_acquire(struct percpu_rw_semaphore *sem,
bool read, unsigned long ip)
{
+#ifndef CONFIG_DEBUG_AID_FOR_SYZBOT
lock_acquire(&sem->rw_sem.dep_map, 0, 1, read, 1, NULL, ip);
+#endif
#ifdef CONFIG_RWSEM_SPIN_ON_OWNER
if (!read)
sem->rw_sem.owner = current;
@@ -1181,6 +1181,12 @@ config DEBUG_LOCK_ALLOC
spin_lock_init()/mutex_init()/etc., or whether there is any lock
held during task exit.
+config DEBUG_AID_FOR_SYZBOT
+ bool "Additional debug options for syzbot"
+ default n
+ help
+ This option is intended for testing by syzbot.
+
config LOCKDEP
bool
depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT