diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 16 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_crypt_tkip.c | 11 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_crypt_wep.c | 2 | ||||
-rw-r--r-- | net/ipv4/esp4.c | 2 | ||||
-rw-r--r-- | net/ipv4/proc.c | 8 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 16 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/esp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 5 | ||||
-rw-r--r-- | net/sched/act_mirred.c | 2 | ||||
-rw-r--r-- | net/sctp/auth.c | 4 | ||||
-rw-r--r-- | net/sctp/sm_make_chunk.c | 8 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_crypto.c | 14 | ||||
-rw-r--r-- | net/sunrpc/xdr.c | 4 | ||||
-rw-r--r-- | net/xfrm/xfrm_algo.c | 10 |
17 files changed, 47 insertions, 68 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 4e2c84fcf276..573e17240197 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -415,13 +415,6 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb) | |||
415 | n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; | 415 | n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; |
416 | n->nohdr = 0; | 416 | n->nohdr = 0; |
417 | n->destructor = NULL; | 417 | n->destructor = NULL; |
418 | #ifdef CONFIG_NET_CLS_ACT | ||
419 | /* FIXME What is this and why don't we do it in copy_skb_header? */ | ||
420 | n->tc_verd = SET_TC_VERD(n->tc_verd,0); | ||
421 | n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); | ||
422 | n->tc_verd = CLR_TC_MUNGED(n->tc_verd); | ||
423 | C(iif); | ||
424 | #endif | ||
425 | C(truesize); | 418 | C(truesize); |
426 | atomic_set(&n->users, 1); | 419 | atomic_set(&n->users, 1); |
427 | C(head); | 420 | C(head); |
@@ -2045,9 +2038,7 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len) | |||
2045 | if (copy > 0) { | 2038 | if (copy > 0) { |
2046 | if (copy > len) | 2039 | if (copy > len) |
2047 | copy = len; | 2040 | copy = len; |
2048 | sg_set_page(&sg[elt], virt_to_page(skb->data + offset)); | 2041 | sg_set_buf(sg, skb->data + offset, copy); |
2049 | sg[elt].offset = (unsigned long)(skb->data + offset) % PAGE_SIZE; | ||
2050 | sg[elt].length = copy; | ||
2051 | elt++; | 2042 | elt++; |
2052 | if ((len -= copy) == 0) | 2043 | if ((len -= copy) == 0) |
2053 | return elt; | 2044 | return elt; |
@@ -2065,9 +2056,8 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len) | |||
2065 | 2056 | ||
2066 | if (copy > len) | 2057 | if (copy > len) |
2067 | copy = len; | 2058 | copy = len; |
2068 | sg_set_page(&sg[elt], frag->page); | 2059 | sg_set_page(&sg[elt], frag->page, copy, |
2069 | sg[elt].offset = frag->page_offset+offset-start; | 2060 | frag->page_offset+offset-start); |
2070 | sg[elt].length = copy; | ||
2071 | elt++; | 2061 | elt++; |
2072 | if (!(len -= copy)) | 2062 | if (!(len -= copy)) |
2073 | return elt; | 2063 | return elt; |
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 811777682e2b..4cce3534e408 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <net/ieee80211.h> | 25 | #include <net/ieee80211.h> |
26 | 26 | ||
27 | #include <linux/crypto.h> | 27 | #include <linux/crypto.h> |
28 | #include <asm/scatterlist.h> | 28 | #include <linux/scatterlist.h> |
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | 30 | ||
31 | MODULE_AUTHOR("Jouni Malinen"); | 31 | MODULE_AUTHOR("Jouni Malinen"); |
@@ -537,13 +537,8 @@ static int michael_mic(struct crypto_hash *tfm_michael, u8 * key, u8 * hdr, | |||
537 | return -1; | 537 | return -1; |
538 | } | 538 | } |
539 | sg_init_table(sg, 2); | 539 | sg_init_table(sg, 2); |
540 | sg_set_page(&sg[0], virt_to_page(hdr)); | 540 | sg_set_buf(&sg[0], hdr, 16); |
541 | sg[0].offset = offset_in_page(hdr); | 541 | sg_set_buf(&sg[1], data, data_len); |
542 | sg[0].length = 16; | ||
543 | |||
544 | sg_set_page(&sg[1], virt_to_page(data)); | ||
545 | sg[1].offset = offset_in_page(data); | ||
546 | sg[1].length = data_len; | ||
547 | 542 | ||
548 | if (crypto_hash_setkey(tfm_michael, key, 8)) | 543 | if (crypto_hash_setkey(tfm_michael, key, 8)) |
549 | return -1; | 544 | return -1; |
diff --git a/net/ieee80211/ieee80211_crypt_wep.c b/net/ieee80211/ieee80211_crypt_wep.c index 9693429489ed..866fc04c44f9 100644 --- a/net/ieee80211/ieee80211_crypt_wep.c +++ b/net/ieee80211/ieee80211_crypt_wep.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <net/ieee80211.h> | 22 | #include <net/ieee80211.h> |
23 | 23 | ||
24 | #include <linux/crypto.h> | 24 | #include <linux/crypto.h> |
25 | #include <asm/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | 27 | ||
28 | MODULE_AUTHOR("Jouni Malinen"); | 28 | MODULE_AUTHOR("Jouni Malinen"); |
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 6b1a31a74cf2..ba9840195cf2 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -110,6 +110,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) | |||
110 | if (!sg) | 110 | if (!sg) |
111 | goto unlock; | 111 | goto unlock; |
112 | } | 112 | } |
113 | sg_init_table(sg, nfrags); | ||
113 | skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); | 114 | skb_to_sgvec(skb, sg, esph->enc_data+esp->conf.ivlen-skb->data, clen); |
114 | err = crypto_blkcipher_encrypt(&desc, sg, sg, clen); | 115 | err = crypto_blkcipher_encrypt(&desc, sg, sg, clen); |
115 | if (unlikely(sg != &esp->sgbuf[0])) | 116 | if (unlikely(sg != &esp->sgbuf[0])) |
@@ -201,6 +202,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) | |||
201 | if (!sg) | 202 | if (!sg) |
202 | goto out; | 203 | goto out; |
203 | } | 204 | } |
205 | sg_init_table(sg, nfrags); | ||
204 | skb_to_sgvec(skb, sg, sizeof(*esph) + esp->conf.ivlen, elen); | 206 | skb_to_sgvec(skb, sg, sizeof(*esph) + esp->conf.ivlen, elen); |
205 | err = crypto_blkcipher_decrypt(&desc, sg, sg, elen); | 207 | err = crypto_blkcipher_decrypt(&desc, sg, sg, elen); |
206 | if (unlikely(sg != &esp->sgbuf[0])) | 208 | if (unlikely(sg != &esp->sgbuf[0])) |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index fd16cb8f8abe..9be0daa9c0ec 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -121,14 +121,6 @@ static const struct snmp_mib snmp4_ipextstats_list[] = { | |||
121 | SNMP_MIB_SENTINEL | 121 | SNMP_MIB_SENTINEL |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static const struct snmp_mib snmp4_icmp_list[] = { | ||
125 | SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), | ||
126 | SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), | ||
127 | SNMP_MIB_ITEM("OutMsgs", ICMP_MIB_OUTMSGS), | ||
128 | SNMP_MIB_ITEM("OutErrors", ICMP_MIB_OUTERRORS), | ||
129 | SNMP_MIB_SENTINEL | ||
130 | }; | ||
131 | |||
132 | static struct { | 124 | static struct { |
133 | char *name; | 125 | char *name; |
134 | int index; | 126 | int index; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3dbbb44b3e7d..47f4f353a470 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -103,7 +103,7 @@ int sysctl_tcp_abc __read_mostly; | |||
103 | #define FLAG_SLOWPATH 0x100 /* Do not skip RFC checks for window update.*/ | 103 | #define FLAG_SLOWPATH 0x100 /* Do not skip RFC checks for window update.*/ |
104 | #define FLAG_ONLY_ORIG_SACKED 0x200 /* SACKs only non-rexmit sent before RTO */ | 104 | #define FLAG_ONLY_ORIG_SACKED 0x200 /* SACKs only non-rexmit sent before RTO */ |
105 | #define FLAG_SND_UNA_ADVANCED 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */ | 105 | #define FLAG_SND_UNA_ADVANCED 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */ |
106 | #define FLAG_DSACKING_ACK 0x800 /* SACK blocks contained DSACK info */ | 106 | #define FLAG_DSACKING_ACK 0x800 /* SACK blocks contained D-SACK info */ |
107 | #define FLAG_NONHEAD_RETRANS_ACKED 0x1000 /* Non-head rexmitted data was ACKed */ | 107 | #define FLAG_NONHEAD_RETRANS_ACKED 0x1000 /* Non-head rexmitted data was ACKed */ |
108 | 108 | ||
109 | #define FLAG_ACKED (FLAG_DATA_ACKED|FLAG_SYN_ACKED) | 109 | #define FLAG_ACKED (FLAG_DATA_ACKED|FLAG_SYN_ACKED) |
@@ -866,7 +866,7 @@ static void tcp_disable_fack(struct tcp_sock *tp) | |||
866 | tp->rx_opt.sack_ok &= ~2; | 866 | tp->rx_opt.sack_ok &= ~2; |
867 | } | 867 | } |
868 | 868 | ||
869 | /* Take a notice that peer is sending DSACKs */ | 869 | /* Take a notice that peer is sending D-SACKs */ |
870 | static void tcp_dsack_seen(struct tcp_sock *tp) | 870 | static void tcp_dsack_seen(struct tcp_sock *tp) |
871 | { | 871 | { |
872 | tp->rx_opt.sack_ok |= 4; | 872 | tp->rx_opt.sack_ok |= 4; |
@@ -1058,7 +1058,7 @@ static void tcp_update_reordering(struct sock *sk, const int metric, | |||
1058 | * | 1058 | * |
1059 | * With D-SACK the lower bound is extended to cover sequence space below | 1059 | * With D-SACK the lower bound is extended to cover sequence space below |
1060 | * SND.UNA down to undo_marker, which is the last point of interest. Yet | 1060 | * SND.UNA down to undo_marker, which is the last point of interest. Yet |
1061 | * again, DSACK block must not to go across snd_una (for the same reason as | 1061 | * again, D-SACK block must not to go across snd_una (for the same reason as |
1062 | * for the normal SACK blocks, explained above). But there all simplicity | 1062 | * for the normal SACK blocks, explained above). But there all simplicity |
1063 | * ends, TCP might receive valid D-SACKs below that. As long as they reside | 1063 | * ends, TCP might receive valid D-SACKs below that. As long as they reside |
1064 | * fully below undo_marker they do not affect behavior in anyway and can | 1064 | * fully below undo_marker they do not affect behavior in anyway and can |
@@ -1080,7 +1080,7 @@ static int tcp_is_sackblock_valid(struct tcp_sock *tp, int is_dsack, | |||
1080 | if (!before(start_seq, tp->snd_nxt)) | 1080 | if (!before(start_seq, tp->snd_nxt)) |
1081 | return 0; | 1081 | return 0; |
1082 | 1082 | ||
1083 | /* In outstanding window? ...This is valid exit for DSACKs too. | 1083 | /* In outstanding window? ...This is valid exit for D-SACKs too. |
1084 | * start_seq == snd_una is non-sensical (see comments above) | 1084 | * start_seq == snd_una is non-sensical (see comments above) |
1085 | */ | 1085 | */ |
1086 | if (after(start_seq, tp->snd_una)) | 1086 | if (after(start_seq, tp->snd_una)) |
@@ -1615,7 +1615,7 @@ void tcp_enter_frto(struct sock *sk) | |||
1615 | !icsk->icsk_retransmits)) { | 1615 | !icsk->icsk_retransmits)) { |
1616 | tp->prior_ssthresh = tcp_current_ssthresh(sk); | 1616 | tp->prior_ssthresh = tcp_current_ssthresh(sk); |
1617 | /* Our state is too optimistic in ssthresh() call because cwnd | 1617 | /* Our state is too optimistic in ssthresh() call because cwnd |
1618 | * is not reduced until tcp_enter_frto_loss() when previous FRTO | 1618 | * is not reduced until tcp_enter_frto_loss() when previous F-RTO |
1619 | * recovery has not yet completed. Pattern would be this: RTO, | 1619 | * recovery has not yet completed. Pattern would be this: RTO, |
1620 | * Cumulative ACK, RTO (2xRTO for the same segment does not end | 1620 | * Cumulative ACK, RTO (2xRTO for the same segment does not end |
1621 | * up here twice). | 1621 | * up here twice). |
@@ -1801,7 +1801,7 @@ void tcp_enter_loss(struct sock *sk, int how) | |||
1801 | tcp_set_ca_state(sk, TCP_CA_Loss); | 1801 | tcp_set_ca_state(sk, TCP_CA_Loss); |
1802 | tp->high_seq = tp->snd_nxt; | 1802 | tp->high_seq = tp->snd_nxt; |
1803 | TCP_ECN_queue_cwr(tp); | 1803 | TCP_ECN_queue_cwr(tp); |
1804 | /* Abort FRTO algorithm if one is in progress */ | 1804 | /* Abort F-RTO algorithm if one is in progress */ |
1805 | tp->frto_counter = 0; | 1805 | tp->frto_counter = 0; |
1806 | } | 1806 | } |
1807 | 1807 | ||
@@ -1946,7 +1946,7 @@ static int tcp_time_to_recover(struct sock *sk) | |||
1946 | struct tcp_sock *tp = tcp_sk(sk); | 1946 | struct tcp_sock *tp = tcp_sk(sk); |
1947 | __u32 packets_out; | 1947 | __u32 packets_out; |
1948 | 1948 | ||
1949 | /* Do not perform any recovery during FRTO algorithm */ | 1949 | /* Do not perform any recovery during F-RTO algorithm */ |
1950 | if (tp->frto_counter) | 1950 | if (tp->frto_counter) |
1951 | return 0; | 1951 | return 0; |
1952 | 1952 | ||
@@ -2962,7 +2962,7 @@ static int tcp_process_frto(struct sock *sk, int flag) | |||
2962 | } | 2962 | } |
2963 | 2963 | ||
2964 | if (tp->frto_counter == 1) { | 2964 | if (tp->frto_counter == 1) { |
2965 | /* Sending of the next skb must be allowed or no FRTO */ | 2965 | /* Sending of the next skb must be allowed or no F-RTO */ |
2966 | if (!tcp_send_head(sk) || | 2966 | if (!tcp_send_head(sk) || |
2967 | after(TCP_SKB_CB(tcp_send_head(sk))->end_seq, | 2967 | after(TCP_SKB_CB(tcp_send_head(sk))->end_seq, |
2968 | tp->snd_una + tp->snd_wnd)) { | 2968 | tp->snd_una + tp->snd_wnd)) { |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 38cf73a56731..ad759f1c3777 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1055,6 +1055,9 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
1055 | bp->pad = 0; | 1055 | bp->pad = 0; |
1056 | bp->protocol = protocol; | 1056 | bp->protocol = protocol; |
1057 | bp->len = htons(tcplen); | 1057 | bp->len = htons(tcplen); |
1058 | |||
1059 | sg_init_table(sg, 4); | ||
1060 | |||
1058 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); | 1061 | sg_set_buf(&sg[block++], bp, sizeof(*bp)); |
1059 | nbytes += sizeof(*bp); | 1062 | nbytes += sizeof(*bp); |
1060 | 1063 | ||
@@ -1080,6 +1083,8 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, | |||
1080 | sg_set_buf(&sg[block++], key->key, key->keylen); | 1083 | sg_set_buf(&sg[block++], key->key, key->keylen); |
1081 | nbytes += key->keylen; | 1084 | nbytes += key->keylen; |
1082 | 1085 | ||
1086 | sg_mark_end(sg, block); | ||
1087 | |||
1083 | /* Now store the Hash into the packet */ | 1088 | /* Now store the Hash into the packet */ |
1084 | err = crypto_hash_init(desc); | 1089 | err = crypto_hash_init(desc); |
1085 | if (err) | 1090 | if (err) |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 35d2b0e9e10b..4bc25b46f33f 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1152,7 +1152,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
1152 | return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable); | 1152 | return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable); |
1153 | 1153 | ||
1154 | sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest, | 1154 | sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest, |
1155 | skb->dev->ifindex, udptable ); | 1155 | inet_iif(skb), udptable); |
1156 | 1156 | ||
1157 | if (sk != NULL) { | 1157 | if (sk != NULL) { |
1158 | int ret = udp_queue_rcv_skb(sk, skb); | 1158 | int ret = udp_queue_rcv_skb(sk, skb); |
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..32dc329762e9 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) { |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index f7ffeec3913f..fda0e06453e8 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1184,7 +1184,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, | |||
1184 | printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " | 1184 | printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " |
1185 | "status=%d aid=%d)\n", | 1185 | "status=%d aid=%d)\n", |
1186 | dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), | 1186 | dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), |
1187 | capab_info, status_code, aid & ~(BIT(15) | BIT(14))); | 1187 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); |
1188 | 1188 | ||
1189 | if (status_code != WLAN_STATUS_SUCCESS) { | 1189 | if (status_code != WLAN_STATUS_SUCCESS) { |
1190 | printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", | 1190 | printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", |
@@ -2096,7 +2096,8 @@ static int ieee80211_sta_match_ssid(struct ieee80211_if_sta *ifsta, | |||
2096 | { | 2096 | { |
2097 | int tmp, hidden_ssid; | 2097 | int tmp, hidden_ssid; |
2098 | 2098 | ||
2099 | if (!memcmp(ifsta->ssid, ssid, ssid_len)) | 2099 | if (ssid_len == ifsta->ssid_len && |
2100 | !memcmp(ifsta->ssid, ssid, ssid_len)) | ||
2100 | return 1; | 2101 | return 1; |
2101 | 2102 | ||
2102 | if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL) | 2103 | if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL) |
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index fd7bca4d5c20..c3fde9180f9d 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -166,7 +166,7 @@ bad_mirred: | |||
166 | return TC_ACT_SHOT; | 166 | return TC_ACT_SHOT; |
167 | } | 167 | } |
168 | 168 | ||
169 | skb2 = skb_clone(skb, GFP_ATOMIC); | 169 | skb2 = skb_act_clone(skb, GFP_ATOMIC); |
170 | if (skb2 == NULL) | 170 | if (skb2 == NULL) |
171 | goto bad_mirred; | 171 | goto bad_mirred; |
172 | if (m->tcfm_eaction != TCA_EGRESS_MIRROR && | 172 | if (m->tcfm_eaction != TCA_EGRESS_MIRROR && |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index cbd64b216cce..621113a109b2 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -727,9 +727,7 @@ void sctp_auth_calculate_hmac(const struct sctp_association *asoc, | |||
727 | /* set up scatter list */ | 727 | /* set up scatter list */ |
728 | end = skb_tail_pointer(skb); | 728 | end = skb_tail_pointer(skb); |
729 | sg_init_table(&sg, 1); | 729 | sg_init_table(&sg, 1); |
730 | sg_set_page(&sg, virt_to_page(auth)); | 730 | sg_set_buf(&sg, auth, end - (unsigned char *)auth); |
731 | sg.offset = (unsigned long)(auth) % PAGE_SIZE; | ||
732 | sg.length = end - (unsigned char *)auth; | ||
733 | 731 | ||
734 | desc.tfm = asoc->ep->auth_hmacs[hmac_id]; | 732 | desc.tfm = asoc->ep->auth_hmacs[hmac_id]; |
735 | desc.flags = 0; | 733 | desc.flags = 0; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 658476c4d587..c055212875f6 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1514,9 +1514,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
1514 | 1514 | ||
1515 | /* Sign the message. */ | 1515 | /* Sign the message. */ |
1516 | sg_init_table(&sg, 1); | 1516 | sg_init_table(&sg, 1); |
1517 | sg_set_page(&sg, virt_to_page(&cookie->c)); | 1517 | sg_set_buf(&sg, &cookie->c, bodysize); |
1518 | sg.offset = (unsigned long)(&cookie->c) % PAGE_SIZE; | ||
1519 | sg.length = bodysize; | ||
1520 | keylen = SCTP_SECRET_SIZE; | 1518 | keylen = SCTP_SECRET_SIZE; |
1521 | key = (char *)ep->secret_key[ep->current_key]; | 1519 | key = (char *)ep->secret_key[ep->current_key]; |
1522 | desc.tfm = sctp_sk(ep->base.sk)->hmac; | 1520 | desc.tfm = sctp_sk(ep->base.sk)->hmac; |
@@ -1587,9 +1585,7 @@ struct sctp_association *sctp_unpack_cookie( | |||
1587 | /* Check the signature. */ | 1585 | /* Check the signature. */ |
1588 | keylen = SCTP_SECRET_SIZE; | 1586 | keylen = SCTP_SECRET_SIZE; |
1589 | sg_init_table(&sg, 1); | 1587 | sg_init_table(&sg, 1); |
1590 | sg_set_page(&sg, virt_to_page(bear_cookie)); | 1588 | sg_set_buf(&sg, bear_cookie, bodysize); |
1591 | sg.offset = (unsigned long)(bear_cookie) % PAGE_SIZE; | ||
1592 | sg.length = bodysize; | ||
1593 | key = (char *)ep->secret_key[ep->current_key]; | 1589 | key = (char *)ep->secret_key[ep->current_key]; |
1594 | desc.tfm = sctp_sk(ep->base.sk)->hmac; | 1590 | desc.tfm = sctp_sk(ep->base.sk)->hmac; |
1595 | desc.flags = 0; | 1591 | desc.flags = 0; |
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index 32be431affcf..24711be4b2dc 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c | |||
@@ -199,7 +199,7 @@ encryptor(struct scatterlist *sg, void *data) | |||
199 | } else { | 199 | } else { |
200 | in_page = sg_page(sg); | 200 | in_page = sg_page(sg); |
201 | } | 201 | } |
202 | sg_set_page(&desc->infrags[desc->fragno], in_page); | 202 | sg_assign_page(&desc->infrags[desc->fragno], in_page); |
203 | desc->fragno++; | 203 | desc->fragno++; |
204 | desc->fraglen += sg->length; | 204 | desc->fraglen += sg->length; |
205 | desc->pos += sg->length; | 205 | desc->pos += sg->length; |
@@ -215,11 +215,10 @@ encryptor(struct scatterlist *sg, void *data) | |||
215 | if (ret) | 215 | if (ret) |
216 | return ret; | 216 | return ret; |
217 | if (fraglen) { | 217 | if (fraglen) { |
218 | sg_set_page(&desc->outfrags[0], sg_page(sg)); | 218 | sg_set_page(&desc->outfrags[0], sg_page(sg), fraglen, |
219 | desc->outfrags[0].offset = sg->offset + sg->length - fraglen; | 219 | sg->offset + sg->length - fraglen); |
220 | desc->outfrags[0].length = fraglen; | ||
221 | desc->infrags[0] = desc->outfrags[0]; | 220 | desc->infrags[0] = desc->outfrags[0]; |
222 | sg_set_page(&desc->infrags[0], in_page); | 221 | sg_assign_page(&desc->infrags[0], in_page); |
223 | desc->fragno = 1; | 222 | desc->fragno = 1; |
224 | desc->fraglen = fraglen; | 223 | desc->fraglen = fraglen; |
225 | } else { | 224 | } else { |
@@ -287,9 +286,8 @@ decryptor(struct scatterlist *sg, void *data) | |||
287 | if (ret) | 286 | if (ret) |
288 | return ret; | 287 | return ret; |
289 | if (fraglen) { | 288 | if (fraglen) { |
290 | sg_set_page(&desc->frags[0], sg_page(sg)); | 289 | sg_set_page(&desc->frags[0], sg_page(sg), fraglen, |
291 | desc->frags[0].offset = sg->offset + sg->length - fraglen; | 290 | sg->offset + sg->length - fraglen); |
292 | desc->frags[0].length = fraglen; | ||
293 | desc->fragno = 1; | 291 | desc->fragno = 1; |
294 | desc->fraglen = fraglen; | 292 | desc->fraglen = fraglen; |
295 | } else { | 293 | } else { |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 3d1f7cdf9dd0..f38dac30481b 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -1059,9 +1059,7 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, | |||
1059 | do { | 1059 | do { |
1060 | if (thislen > page_len) | 1060 | if (thislen > page_len) |
1061 | thislen = page_len; | 1061 | thislen = page_len; |
1062 | sg_set_page(sg, buf->pages[i]); | 1062 | sg_set_page(sg, buf->pages[i], thislen, page_offset); |
1063 | sg->offset = page_offset; | ||
1064 | sg->length = thislen; | ||
1065 | ret = actor(sg, data); | 1063 | ret = actor(sg, data); |
1066 | if (ret) | 1064 | if (ret) |
1067 | goto out; | 1065 | goto out; |
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 313d4bed3aa9..0426388d351d 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c | |||
@@ -553,9 +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_page(&sg, virt_to_page(skb->data + offset)); | 556 | sg_init_one(&sg, skb->data + offset, copy); |
557 | sg.offset = (unsigned long)(skb->data + offset) % PAGE_SIZE; | ||
558 | sg.length = copy; | ||
559 | 557 | ||
560 | err = icv_update(desc, &sg, copy); | 558 | err = icv_update(desc, &sg, copy); |
561 | if (unlikely(err)) | 559 | if (unlikely(err)) |
@@ -578,9 +576,9 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc, | |||
578 | if (copy > len) | 576 | if (copy > len) |
579 | copy = len; | 577 | copy = len; |
580 | 578 | ||
581 | sg_set_page(&sg, frag->page); | 579 | sg_init_table(&sg, 1); |
582 | sg.offset = frag->page_offset + offset-start; | 580 | sg_set_page(&sg, frag->page, copy, |
583 | sg.length = copy; | 581 | frag->page_offset + offset-start); |
584 | 582 | ||
585 | err = icv_update(desc, &sg, copy); | 583 | err = icv_update(desc, &sg, copy); |
586 | if (unlikely(err)) | 584 | if (unlikely(err)) |