Эх сурвалжийг харах

ipv6: fix error propagation in ip6_ufo_append_data()

We should return errcode from sock_alloc_send_skb()

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Zheng Yan 13 жил өмнө
parent
commit
504744e4ed
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      net/ipv6/ip6_output.c

+ 1 - 1
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);