Patchwork ipv6: fix error propagation in ip6_ufo_append_data()

login
register
mail settings
Submitter Yan, Zheng
Date Oct. 28, 2011, 4:24 a.m.
Message ID <4EAA2E74.2000703@intel.com>
Download mbox | patch
Permalink /patch/122341/
State Accepted
Delegated to: David Miller
Headers show

Comments

Yan, Zheng - Oct. 28, 2011, 4:24 a.m.
We should return errcode from sock_alloc_send_skb()

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 28, 2011, 4:26 a.m.
From: "Yan, Zheng" <zheng.z.yan@intel.com>
Date: Fri, 28 Oct 2011 12:24:20 +0800

> We should return errcode from sock_alloc_send_skb()
> 
> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>

Applied, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index ff30047..84d0bd5 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1123,7 +1123,7 @@  static inline int ip6_ufo_append_data(struct sock *sk,
 			hh_len + fragheaderlen + transhdrlen + 20,
 			(flags & MSG_DONTWAIT), &err);
 		if (skb == NULL)
-			return -ENOMEM;
+			return err;
 
 		/* reserve space for Hardware header */
 		skb_reserve(skb, hh_len);