Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e0940d4bb9b19c0a45c844a83e1d25686aaf433 Commit: 0e0940d4bb9b19c0a45c844a83e1d25686aaf433 Parent: ed0e7e0ca370519d6f79d1093ee2890d4cdee744 Author: David S. Miller <[EMAIL PROTECTED]> AuthorDate: Fri Oct 26 00:39:27 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Fri Oct 26 00:39:27 2007 -0700
[IPSEC]: Fix scatterlist handling in skb_icv_walk(). Use sg_init_one() and sg_init_table() as needed. Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- 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 fa45989..0426388 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, 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,8 +576,9 @@ 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); + frag->page_offset + offset-start); err = icv_update(desc, &sg, copy); if (unlikely(err)) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html