It was found that the use of up_read_non_owner() in NFS was causing the following warning when DEBUG_RWSEMS was configured. DEBUG_LOCKS_WARN_ON(sem->owner != ((struct task_struct *)(1UL << 0))) Looking into the rwsem.c file, it was discovered that the corresponding down_read_non_owner() function was not setting the owner field properly. This is fixed now, and the warning should be gone.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -181,6 +181,7 @@ void down_read_non_owner(struct rw_semaphore *sem) · 180 unmodified lines | |||
| 181 | might_sleep(); | 181 | might_sleep(); |
| 182 | 182 | ||
| 183 | __down_read(sem); | 183 | __down_read(sem); |
| 184 | rwsem_set_reader_owned(sem); | ||
| 184 | } | 185 | } |
| 185 | 186 | ||
| 186 | EXPORT_SYMBOL(down_read_non_owner); | 187 | EXPORT_SYMBOL(down_read_non_owner); |