Closed lancerchao closed 8 years ago
In practice I don't think this is much of an issue since I don't think you'd ever splice to and from the same pipe.
I'm not sure here. Is the synchronization in other parts of the kernel left to user space as well?
Is this still relevant? It looks fixed to me. I ran with lockdep and didn't see the error.
It looks like tls_sock_splice calls relase_sock so only pipe_lock is held, similar to the other socket implementations I looked at. rx_lock is gone entirely.
Closing unless someone thinks otherwise...
tls_splice_read acquires locks in the order: 1) tsk->rx_lock 2) lock_sock(tsk) 3) pipe_lock (called in splice_to_pipe)
tls_sendpage acquires lock in the order: 1) pipe_lock (called in splice_from_pipe) 2) tsk_rx_lock 3) lock_sock(tsk)
Kernel warns about possible deadlock http://pastebin.com/tYCk0bxy
In practice I don't think this is much of an issue since I don't think you'd ever splice to and from the same pipe.