]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix inconsistent signal handling regression
authorErik Hugne <erik.hugne@ericsson.com>
Mon, 9 Mar 2015 09:43:42 +0000 (10:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2015 19:42:19 +0000 (15:42 -0400)
commit61f2f69cc133319b7d6f18e484b160cc26a42058
treeff4c064cb226d455ad2273770dec7432a58357ba
parentacf33c6d7e68eff5c3e700053d77f4dd3ac8b1a0
tipc: fix inconsistent signal handling regression

Commit 35443cdd756b ("tipc: standardize recvmsg routine") changed
the sleep/wakeup behaviour for sockets entering recv() or accept().
In this process the order of reporting -EAGAIN/-EINTR was reversed.
This caused problems with wrong errno being reported back if the
timeout expires. The same problem happens if the socket is
nonblocking and recv()/accept() is called when the process have
pending signals. If there is no pending data read or connections to
accept, -EINTR will be returned instead of -EAGAIN.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reported-by László Benedek <laszlo.benedek@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c