diff options
Diffstat (limited to 'net/decnet/af_decnet.c')
-rw-r--r-- | net/decnet/af_decnet.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 3f25cadccddd..f89e55f814d9 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -1664,17 +1664,15 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1664 | goto out; | 1664 | goto out; |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | rv = dn_check_state(sk, NULL, 0, &timeo, flags); | ||
1668 | if (rv) | ||
1669 | goto out; | ||
1670 | |||
1671 | if (sk->sk_shutdown & RCV_SHUTDOWN) { | 1667 | if (sk->sk_shutdown & RCV_SHUTDOWN) { |
1672 | if (!(flags & MSG_NOSIGNAL)) | 1668 | rv = 0; |
1673 | send_sig(SIGPIPE, current, 0); | ||
1674 | rv = -EPIPE; | ||
1675 | goto out; | 1669 | goto out; |
1676 | } | 1670 | } |
1677 | 1671 | ||
1672 | rv = dn_check_state(sk, NULL, 0, &timeo, flags); | ||
1673 | if (rv) | ||
1674 | goto out; | ||
1675 | |||
1678 | if (flags & ~(MSG_PEEK|MSG_OOB|MSG_WAITALL|MSG_DONTWAIT|MSG_NOSIGNAL)) { | 1676 | if (flags & ~(MSG_PEEK|MSG_OOB|MSG_WAITALL|MSG_DONTWAIT|MSG_NOSIGNAL)) { |
1679 | rv = -EOPNOTSUPP; | 1677 | rv = -EOPNOTSUPP; |
1680 | goto out; | 1678 | goto out; |
@@ -1928,6 +1926,8 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1928 | 1926 | ||
1929 | if (sk->sk_shutdown & SEND_SHUTDOWN) { | 1927 | if (sk->sk_shutdown & SEND_SHUTDOWN) { |
1930 | err = -EPIPE; | 1928 | err = -EPIPE; |
1929 | if (!(flags & MSG_NOSIGNAL)) | ||
1930 | send_sig(SIGPIPE, current, 0); | ||
1931 | goto out_err; | 1931 | goto out_err; |
1932 | } | 1932 | } |
1933 | 1933 | ||