seqcount: Add lockdep functionality to seqcount/seqlock structures
Currently seqlocks and seqcounts don't support lockdep. After running across a seqcount related deadlock in the timekeeping code, I used a less-refined and more focused variant of this patch to narrow down the cause of the issue. This is a first-pass attempt to properly enable lockdep functionality on seqlocks and seqcounts. Since seqcounts are used in the vdso gettimeofday code, I've provided non-lockdep accessors for those needs. I've also handled one case where there were nested seqlock writers and there may be more edge cases. Comments and feedback would be appreciated! Signed-off-by:John Stultz <john.stultz@linaro.org> Signed-off-by:
Peter Zijlstra <peterz@infradead.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Li Zefan <lizefan@huawei.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/1381186321-4906-3-git-send-email-john.stultz@linaro.org Signed-off-by:
Ingo Molnar <mingo@kernel.org>
Showing
- arch/x86/vdso/vclock_gettime.c 4 additions, 4 deletionsarch/x86/vdso/vclock_gettime.c
- fs/dcache.c 2 additions, 2 deletionsfs/dcache.c
- fs/fs_struct.c 1 addition, 1 deletionfs/fs_struct.c
- include/linux/init_task.h 4 additions, 4 deletionsinclude/linux/init_task.h
- include/linux/lockdep.h 6 additions, 2 deletionsinclude/linux/lockdep.h
- include/linux/seqlock.h 72 additions, 7 deletionsinclude/linux/seqlock.h
- mm/filemap_xip.c 1 addition, 1 deletionmm/filemap_xip.c
Loading
Please register or sign in to comment