netdev
[Top] [All Lists]

Re: Linux 2.6.0-test9

To: Andrew Morton <akpm@xxxxxxxx>
Subject: Re: Linux 2.6.0-test9
From: Linus Torvalds <torvalds@xxxxxxxx>
Date: Sun, 26 Oct 2003 16:28:11 -0800 (PST)
Cc: Andries.Brouwer@xxxxxx, Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>, <kuznet@xxxxxxxxxxxxx>
In-reply-to: <Pine.LNX.4.44.0310261607230.3157-100000@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sun, 26 Oct 2003, Linus Torvalds wrote:
> 
> Andries, what was the situation that led to a TCP lockup? I don't see 
> anything but URG being broken by that patch, so it would be good to verify 
> that your breakage really was URG, to see that it's totally understood..

Btw, final comment: if it really is URG-only breakage, then instead of 
reverting the patch (if it had some other reasons going for it), we could 
change the URG test at the top of the loop from

        if (copied && tp->urg_data && tp->urg_seq == *seq)
                break

to

        if (tp->urg_data && tp->urg_seq == *seq) {
                if (copied)
                        break;
                if (signal_pending(current)) {
                        copied = timeo ? sock_intr_errno(timeo) : -EAGAIN;
                        break;
                }
        }

which gives the right break semantics for URG data.

After that, the only other place where we should check for signal pending 
is probably at the tcp_data_wait() call. All the other signal pending 
checks seem bogus (ie right now a pending signal will mean that we avoid 
doing even TCP-level cleanups, which looks just wrong).

But reverting the change is clearly the "safer" thing to do, I just worry 
that Alexey might have had a real reason for tryign to avoid the EINTR in 
the first place (for non-URG data).

                Linus


<Prev in Thread] Current Thread [Next in Thread>