Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-07 Thread Eric Dumazet
On Sun, 2016-02-07 at 22:24 +, Rainer Weikusat wrote: > Rainer Weikusat writes: > > [...] > > > The start uses that to record an error which might need to be > > reported, the return statement uses it to indicate that an error has > > occurred. Hence, some kind of in-between translation must

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-07 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > The start uses that to record an error which might need to be > reported, the return statement uses it to indicate that an error has > occurred. Hence, some kind of in-between translation must occur. The > mutex_lock_interruptible happened to do that but that was

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-07 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > the real problem is that the function disagrees with itself on how to > use the err variable: The start uses that to record an error which > might need to be reported, the return statement uses it to indicate > that an error has occurred. This should have been "a

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-07 Thread Rainer Weikusat
Eric Dumazet writes: > On Fri, 2016-02-05 at 21:44 +, Rainer Weikusat wrote: >> The present unix_stream_read_generic contains various code sequences of >> the form >> >> err = -EDISASTER; >> if () >> goto out; >> >> This has the unfortunate side effect of possibly causing the error code

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Eric Dumazet
On Fri, 2016-02-05 at 21:44 +, Rainer Weikusat wrote: > The present unix_stream_read_generic contains various code sequences of > the form > > err = -EDISASTER; > if () > goto out; > > This has the unfortunate side effect of possibly causing the error code > to bleed through to the fina

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Rainer Weikusat
Rainer Weikusat writes: > Joseph Salisbury writes: >> On 02/05/2016 02:59 PM, Rainer Weikusat wrote: > > [recvmsg w/o iovecs returning ENOTSUP for CMSG requests] [...] > There are more problems wrt handling control-message only reads in this > code. [...] > it will return without an error but

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Rainer Weikusat
The present unix_stream_read_generic contains various code sequences of the form err = -EDISASTER; if () goto out; This has the unfortunate side effect of possibly causing the error code to bleed through to the final out: return copied ? : err; and then to be wrongly returned if

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Rainer Weikusat
Joseph Salisbury writes: > On 02/05/2016 02:59 PM, Rainer Weikusat wrote: [recvmsg w/o iovecs returning ENOTSUP for CMSG requests] >> Funny little problem :-). The code using the interruptible lock cleared >> err as side effect hence the >> >> out: >> return copied ? : err; >> >> at the end

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Joseph Salisbury
On 02/05/2016 02:59 PM, Rainer Weikusat wrote: > Joseph Salisbury writes: >> Hi Rainer, >> >> A kernel bug report was opened against Ubuntu [0]. After a kernel >> bisect, it was found that reverting the following commit resolved this bug: >> >> commit 3822b5c2fc62e3de8a0f33806ff279fb7df92432 >> A

Re: [V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Rainer Weikusat
Joseph Salisbury writes: > Hi Rainer, > > A kernel bug report was opened against Ubuntu [0]. After a kernel > bisect, it was found that reverting the following commit resolved this bug: > > commit 3822b5c2fc62e3de8a0f33806ff279fb7df92432 > Author: Rainer Weikusat > Date: Wed Dec 16 20:09:25 20

[V4.4-rc6 Regression] af_unix: Revert 'lock_interruptible' in stream receive code

2016-02-05 Thread Joseph Salisbury
Hi Rainer, A kernel bug report was opened against Ubuntu [0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 3822b5c2fc62e3de8a0f33806ff279fb7df92432 Author: Rainer Weikusat Date: Wed Dec 16 20:09:25 2015 + af_unix: Revert 'lock_inte