diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-01 14:43:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-04 13:29:29 -0700 |
commit | 6e1ce3c3451291142a57c4f3f6f999a29fb5b3bc (patch) | |
tree | 44c5431d3f3ee9b9cffe3415f0b359091f52efff /net/ipv6 | |
parent | 38f7bd94a97b542de86a2be9229289717e33a7a4 (diff) |
af_unix: split 'u->readlock' into two: 'iolock' and 'bindlock'
Right now we use the 'readlock' both for protecting some of the af_unix
IO path and for making the bind be single-threaded.
The two are independent, but using the same lock makes for a nasty
deadlock due to ordering with regards to filesystem locking. The bind
locking would want to nest outside the VSF pathname locking, but the IO
locking wants to nest inside some of those same locks.
We tried to fix this earlier with commit c845acb324aa ("af_unix: Fix
splice-bind deadlock") which moved the readlock inside the vfs locks,
but that caused problems with overlayfs that will then call back into
filesystem routines that take the lock in the wrong order anyway.
Splitting the locks means that we can go back to having the bind lock be
the outermost lock, and we don't have any deadlocks with lock ordering.
Acked-by: Rainer Weikusat <rweikusat@cyberadapt.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions