net: unix: non blocking recvmsg() should not return -EINTR
authorEric Dumazet <edumazet@google.com>
Wed, 26 Mar 2014 01:42:27 +0000 (18:42 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 Apr 2014 15:23:16 +0000 (16:23 +0100)
commite7177969baa17560848666cb547b6c05ca86297a
tree585595edfb753885dc188e18c64a902bcc3ff156
parent36672f6303a461e8dee4e1eab5a80bdfb31795f7
net: unix: non blocking recvmsg() should not return -EINTR

[ Upstream commit de1443916791d75fdd26becb116898277bb0273f ]

Some applications didn't expect recvmsg() on a non blocking socket
could return -EINTR. This possibility was added as a side effect
of commit b3ca9b02b00704 ("net: fix multithreaded signal handling in
unix recv routines").

To hit this bug, you need to be a bit unlucky, as the u->readlock
mutex is usually held for very small periods.

Fixes: b3ca9b02b00704 ("net: fix multithreaded signal handling in unix recv routines")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/unix/af_unix.c