Commit 0e0940d4 authored by David S. Miller's avatar David S. Miller

[IPSEC]: Fix scatterlist handling in skb_icv_walk().

Use sg_init_one() and sg_init_table() as needed.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed0e7e0c
......@@ -553,7 +553,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
if (copy > len)
copy = len;
sg_set_buf(&sg, skb->data + offset, copy);
sg_init_one(&sg, skb->data + offset, copy);
err = icv_update(desc, &sg, copy);
if (unlikely(err))
......@@ -576,6 +576,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
if (copy > len)
copy = len;
sg_init_table(&sg, 1);
sg_set_page(&sg, frag->page, copy,
frag->page_offset + offset-start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment