diff options
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_algo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index fa45989a716a..0426388d351d 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c | |||
@@ -553,7 +553,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc, | |||
553 | if (copy > len) | 553 | if (copy > len) |
554 | copy = len; | 554 | copy = len; |
555 | 555 | ||
556 | sg_set_buf(&sg, skb->data + offset, copy); | 556 | sg_init_one(&sg, skb->data + offset, copy); |
557 | 557 | ||
558 | err = icv_update(desc, &sg, copy); | 558 | err = icv_update(desc, &sg, copy); |
559 | if (unlikely(err)) | 559 | if (unlikely(err)) |
@@ -576,8 +576,9 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc, | |||
576 | if (copy > len) | 576 | if (copy > len) |
577 | copy = len; | 577 | copy = len; |
578 | 578 | ||
579 | sg_init_table(&sg, 1); | ||
579 | sg_set_page(&sg, frag->page, copy, | 580 | sg_set_page(&sg, frag->page, copy, |
580 | frag->page_offset + offset-start); | 581 | frag->page_offset + offset-start); |
581 | 582 | ||
582 | err = icv_update(desc, &sg, copy); | 583 | err = icv_update(desc, &sg, copy); |
583 | if (unlikely(err)) | 584 | if (unlikely(err)) |