diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-26 11:43:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-26 11:43:05 -0400 |
commit | ec3b67c11df42362ccda81261d62829042f223f0 (patch) | |
tree | ab66bc43d98e38eda7162f76208993b2280f88f3 /net/ipv6 | |
parent | e868171a94b637158a3930c9adfb448d0df163cd (diff) | |
parent | 4be2700fb7b95f2a7cef9324879cafccab8774fc (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
[NetLabel]: correct usage of RCU locking
[TCP]: fix D-SACK cwnd handling
[NET] napi: use non-interruptible sleep in napi_disable
[SCTP] net/sctp/auth.c: make 3 functions static
[TCP]: Add missing I/O AT code to ipv6 side.
[SCTP]: #if 0 sctp_update_copy_cksum()
[INET]: Unexport icmpmsg_statistics
[NET]: Unexport sock_enable_timestamp().
[TCP]: Make tcp_match_skb_to_sack() static.
[IRDA]: Make ircomm_tty static.
[NET] fs/proc/proc_net.c: make a struct static
[NET] dev_change_name: ignore changes to same name
[NET]: Document some simple rules for actions
[NET_CLS_ACT]: Use skb_act_clone
[NET_CLS_ACT]: Introduce skb_act_clone
[TCP]: Fix scatterlist handling in MD5 signature support.
[IPSEC]: Fix scatterlist handling in skb_icv_walk().
[IPSEC]: Add missing sg_init_table() calls to ESP.
[CRYPTO]: Initialize TCRYPT on-stack scatterlist objects correctly.
[CRYPTO]: HMAC needs some more scatterlist fixups.
...
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 72a659806cad..f67d51a4e56d 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
@@ -109,6 +109,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
109 | if (!sg) | 109 | if (!sg) |
110 | goto unlock; | 110 | goto unlock; |
111 | } | 111 | } |
112 | sg_init_table(sg, nfrags); | ||
112 | skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); | 113 | skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); |
113 | err = crypto_blkcipher_encrypt(&desc, sg, sg, clen); | 114 | err = crypto_blkcipher_encrypt(&desc, sg, sg, clen); |
114 | if (unlikely(sg != &esp->sgbuf[0])) | 115 | if (unlikely(sg != &esp->sgbuf[0])) |
@@ -205,6 +206,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
205 | goto out; | 206 | goto out; |
206 | } | 207 | } |
207 | } | 208 | } |
209 | sg_init_table(sg, nfrags); | ||
208 | skb_to_sgvec(skb, sg, sizeof(*esph) + esp->conf.ivlen, elen); | 210 | skb_to_sgvec(skb, sg, sizeof(*esph) + esp->conf.ivlen, elen); |
209 | ret = crypto_blkcipher_decrypt(&desc, sg, sg, elen); | 211 | ret = crypto_blkcipher_decrypt(&desc, sg, sg, elen); |
210 | if (unlikely(sg != &esp->sgbuf[0])) | 212 | if (unlikely(sg != &esp->sgbuf[0])) |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 737b755342bd..06fa4baddf05 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -757,6 +757,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
757 | bp->len = htonl(tcplen); | 757 | bp->len = htonl(tcplen); |
758 | bp->protocol = htonl(protocol); | 758 | bp->protocol = htonl(protocol); |
759 | 759 | ||
760 | sg_init_table(sg, 4); | ||
761 | |||
760 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); | 762 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); |
761 | nbytes += sizeof(*bp); | 763 | nbytes += sizeof(*bp); |
762 | 764 | ||
@@ -778,6 +780,8 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
778 | sg_set_buf(&sg[block++], key->key, key->keylen); | 780 | sg_set_buf(&sg[block++], key->key, key->keylen); |
779 | nbytes += key->keylen; | 781 | nbytes += key->keylen; |
780 | 782 | ||
783 | sg_mark_end(sg, block); | ||
784 | |||
781 | /* Now store the hash into the packet */ | 785 | /* Now store the hash into the packet */ |
782 | err = crypto_hash_init(desc); | 786 | err = crypto_hash_init(desc); |
783 | if (err) { | 787 | if (err) { |
@@ -1728,6 +1732,8 @@ process: | |||
1728 | if (!sock_owned_by_user(sk)) { | 1732 | if (!sock_owned_by_user(sk)) { |
1729 | #ifdef CONFIG_NET_DMA | 1733 | #ifdef CONFIG_NET_DMA |
1730 | struct tcp_sock *tp = tcp_sk(sk); | 1734 | struct tcp_sock *tp = tcp_sk(sk); |
1735 | if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) | ||
1736 | tp->ucopy.dma_chan = get_softnet_dma(); | ||
1731 | if (tp->ucopy.dma_chan) | 1737 | if (tp->ucopy.dma_chan) |
1732 | ret = tcp_v6_do_rcv(sk, skb); | 1738 | ret = tcp_v6_do_rcv(sk, skb); |
1733 | else | 1739 | else |