]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "af_unix: Fix splice-bind deadlock"
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Sep 2016 21:56:49 +0000 (14:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Sep 2016 20:29:29 +0000 (13:29 -0700)
commitf4e2a855682d7dae6e7cd0c91f30309988b9b44e
treed66b5037baec1e73674d20c179221f90ace84431
parent9cf50741ad6c296eb36da1453f542dd6271ac3a4
Revert "af_unix: Fix splice-bind deadlock"

This reverts commit 25215b87cf99c4b5a72169efcf7e4fa5434771b2.

It turns out that it just replaces one deadlock with another one: we can
still get the wrong lock ordering with the readlock due to overlayfs
calling back into the filesystem layer and still taking the vfs locks
after the readlock.

The proper solution ends up being to just split the readlock into two
pieces: the bind lock (taken *outside* the vfs locks) and the IO lock
(taken *inside* the filesystem locks).  The two locks are independent
anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c