On Fri, Apr 1, 2016, at 05:13, Eric Dumazet wrote: > On Fri, 2016-04-01 at 04:01 +0200, Hannes Frederic Sowa wrote: > > > I thought so first, as well. But given the double check for the > > spin_lock and the "mutex" we end up with the same result for the > > lockdep_sock_is_held check. > > > > Do you see other consequences? > > Well, we release the spinlock in __release_sock() > > So another thread could come and acquire the socket, then call > mutex_acquire() while the first thread did not call yet mutex_release() > > So maybe lockdep will complain (but I do not know lockdep enough to > tell) > > So maybe the following would be better : > > (Absolutely untested, really I need to take a break)
I quickly tested the patch and my scripts didn't show any splats so far. This patch seems more consistent albeit I don't think it is relevant for lockdep_sock_is_held as we only flip owned while holding slock. But this definitely needs more review. Thanks a lot!