aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/netback.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xen-netback/netback.c')
-rw-r--r--drivers/net/xen-netback/netback.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 611aebee4583..4f81ac0e2f0a 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -524,7 +524,7 @@ static void xenvif_rx_action(struct xenvif *vif)
524 if (!npo.copy_prod) 524 if (!npo.copy_prod)
525 goto done; 525 goto done;
526 526
527 BUG_ON(npo.copy_prod > ARRAY_SIZE(vif->grant_copy_op)); 527 BUG_ON(npo.copy_prod > MAX_GRANT_COPY_OPS);
528 gnttab_batch_copy(vif->grant_copy_op, npo.copy_prod); 528 gnttab_batch_copy(vif->grant_copy_op, npo.copy_prod);
529 529
530 while ((skb = __skb_dequeue(&rxq)) != NULL) { 530 while ((skb = __skb_dequeue(&rxq)) != NULL) {
@@ -1108,8 +1108,10 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
1108 goto out; 1108 goto out;
1109 1109
1110 if (!skb_partial_csum_set(skb, off, 1110 if (!skb_partial_csum_set(skb, off,
1111 offsetof(struct tcphdr, check))) 1111 offsetof(struct tcphdr, check))) {
1112 err = -EPROTO;
1112 goto out; 1113 goto out;
1114 }
1113 1115
1114 if (recalculate_partial_csum) 1116 if (recalculate_partial_csum)
1115 tcp_hdr(skb)->check = 1117 tcp_hdr(skb)->check =
@@ -1126,8 +1128,10 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
1126 goto out; 1128 goto out;
1127 1129
1128 if (!skb_partial_csum_set(skb, off, 1130 if (!skb_partial_csum_set(skb, off,
1129 offsetof(struct udphdr, check))) 1131 offsetof(struct udphdr, check))) {
1132 err = -EPROTO;
1130 goto out; 1133 goto out;
1134 }
1131 1135
1132 if (recalculate_partial_csum) 1136 if (recalculate_partial_csum)
1133 udp_hdr(skb)->check = 1137 udp_hdr(skb)->check =
@@ -1249,8 +1253,10 @@ static int checksum_setup_ipv6(struct xenvif *vif, struct sk_buff *skb,
1249 goto out; 1253 goto out;
1250 1254
1251 if (!skb_partial_csum_set(skb, off, 1255 if (!skb_partial_csum_set(skb, off,
1252 offsetof(struct tcphdr, check))) 1256 offsetof(struct tcphdr, check))) {
1257 err = -EPROTO;
1253 goto out; 1258 goto out;
1259 }
1254 1260
1255 if (recalculate_partial_csum) 1261 if (recalculate_partial_csum)
1256 tcp_hdr(skb)->check = 1262 tcp_hdr(skb)->check =
@@ -1267,8 +1273,10 @@ static int checksum_setup_ipv6(struct xenvif *vif, struct sk_buff *skb,
1267 goto out; 1273 goto out;
1268 1274
1269 if (!skb_partial_csum_set(skb, off, 1275 if (!skb_partial_csum_set(skb, off,
1270 offsetof(struct udphdr, check))) 1276 offsetof(struct udphdr, check))) {
1277 err = -EPROTO;
1271 goto out; 1278 goto out;
1279 }
1272 1280
1273 if (recalculate_partial_csum) 1281 if (recalculate_partial_csum)
1274 udp_hdr(skb)->check = 1282 udp_hdr(skb)->check =