Skip to contentSkip to conversation

New: POLLIN bit is set when there is OOB data only

Bug 15541 Applied Stephen Hemminger 2 participants 2 messages Mar 15, 2010 – Mar 19, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Begin forwarded message:

Date: Mon, 15 Mar 2010 16:19:44 GMT
From: [email protected]
To: [email protected]
Subject: [Bug 15541] New: POLLIN bit is set when there is OOB data only

http://bugzilla.kernel.org/show_bug.cgi?id=15541

           Summary: POLLIN bit is set when there is OOB data only
           Product: Networking
           Version: 2.5
    Kernel Version: 2.6.28, 2.6.32, 2.6.33
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: IPV4
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
        Regression: Yes

Starting from 2.6.28, Linux kernel has incorrect behaviour when poll() is called on TCP socket with out-of-band byte received.

When TCP socket has OOB byte available (and no normal data), old Linux, Solaris, FreeBSD and other systems return POLLPRI bit without POLLRD. Starting from 2.6.28, Linux returns POLLRD | POLLPRI | POLLRDNORM.

The broken commt is
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.28.y.git;a=commitdiff;h=c7004482e8dcb7c3c72666395cfa98a216a4fb70
.
Following 1-line patch fixes the problem:

net/ipv4/tcp.c 2010-03-15 19:13:21.000000000 +0300 renamed from net/ipv4/tcp.c 2010-03-15 19:13:45.000000000 +0300 +1 -1
@@ -428,7 +428,7 @@
                if (tp->urg_seq == tp->copied_seq &&
                    !sock_flag(sk, SOCK_URGINLINE) &&
                    tp->urg_data)
-                       target--;
+                       target++;
 
                /* Potential race condition. If read of tp below will
                 * escape above sk->sk_state, we can be illegally awaken
Signature · 6 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


-- 
maintainer Applied
#1 lore raw

Applied to net-2.6 and queued up for -stable, thanks for forwarding this Stephen.