splice-bind deadlock (was: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code)

2015-12-18 Thread Rainer Weikusat
Rainer Weikusat writes: > Hannes Frederic Sowa writes: > > [...] > >> There is still a deadlock lingering around > > [...] > >> http://lists.openwall.net/netdev/2015/11/10/4 [...] > (a while ago) A: socketpair() > > B: splice() from a pipe to /mnt/regular_file > do

Re: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-17 Thread Rainer Weikusat
Hannes Frederic Sowa writes: [...] > There is still a deadlock lingering around [...] > http://lists.openwall.net/netdev/2015/11/10/4 Interesting problem. Assuming the description (a while ago) A: socketpair() B: splice() from a pipe to /mnt/regular_file d

Re: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-17 Thread David Miller
From: Rainer Weikusat Date: Wed, 16 Dec 2015 20:09:25 + > With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM > receive code was changed from using mutex_lock(&u->readlock) to > mutex_lock_interruptible(&u->readlock) to prevent signals from being > delayed for an indefinite

Re: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-17 Thread Hannes Frederic Sowa
On 17.12.2015 16:28, Rainer Weikusat wrote: > Hannes Frederic Sowa writes: >> On 16.12.2015 21:09, Rainer Weikusat wrote: >>> With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM >>> receive code was changed from using mutex_lock(&u->readlock) to >>> mutex_lock_interruptible(&u->

Re: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-17 Thread Rainer Weikusat
Hannes Frederic Sowa writes: > On 16.12.2015 21:09, Rainer Weikusat wrote: >> With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM >> receive code was changed from using mutex_lock(&u->readlock) to >> mutex_lock_interruptible(&u->readlock) to prevent signals from being >> delayed

Re: [PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-17 Thread Hannes Frederic Sowa
On 16.12.2015 21:09, Rainer Weikusat wrote: > With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM > receive code was changed from using mutex_lock(&u->readlock) to > mutex_lock_interruptible(&u->readlock) to prevent signals from being > delayed for an indefinite time if a thread

[PATCH] af_unix: Revert 'lock_interruptible' in stream receive code

2015-12-16 Thread Rainer Weikusat
With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM receive code was changed from using mutex_lock(&u->readlock) to mutex_lock_interruptible(&u->readlock) to prevent signals from being delayed for an indefinite time if a thread sleeping on the mutex happened to be selected for ha