summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEugene Crosser <Eugene.Crosser@ru.ibm.com>2015-03-30 15:40:42 +0200
committerDavid S. Miller <davem@davemloft.net>2015-03-31 16:06:50 -0400
commited4ac4221776a5103faf71a4032ca00178d6e66b (patch)
tree3dada68e8d61f5d470ca37fd695ba6434041b5a8 /net
parentfa2d8ff4e3522b4e05f590575d3eb8087f3a8cdc (diff)
downloadlinux-ed4ac4221776a5103faf71a4032ca00178d6e66b.tar.gz
linux-ed4ac4221776a5103faf71a4032ca00178d6e66b.tar.bz2
linux-ed4ac4221776a5103faf71a4032ca00178d6e66b.zip
af_iucv: fix AF_IUCV sendmsg() errno
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>
Diffstat (limited to 'net')
-rw-r--r--net/iucv/af_iucv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 2e9953b2db84..53d931172088 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -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)) {