Skip to content

Commit

Permalink
af_iucv: fix AF_IUCV sendmsg() errno
Browse files Browse the repository at this point in the history
When sending over AF_IUCV socket, errno was incorrectly set to
ENOMEM even when other values where appropriate, notably EAGAIN.
With this patch, error indicator returned by sock_alloc_send_skb()
is passed to the caller, rather than being overwritten with ENOMEM.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eugene Crosser authored and davem330 committed Mar 31, 2015
1 parent fa2d8ff commit ed4ac42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/iucv/af_iucv.c
Expand Up @@ -1114,10 +1114,8 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
noblock, &err);
else
skb = sock_alloc_send_skb(sk, len, noblock, &err);
if (!skb) {
err = -ENOMEM;
if (!skb)
goto out;
}
if (iucv->transport == AF_IUCV_TRANS_HIPER)
skb_reserve(skb, sizeof(struct af_iucv_trans_hdr) + ETH_HLEN);
if (memcpy_from_msg(skb_put(skb, len), msg, len)) {
Expand Down

0 comments on commit ed4ac42

Please sign in to comment.