diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-25 04:42:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 04:42:21 -0400 |
commit | c649c0e31d5736a4b7c5c3454182091dda4bbe62 (patch) | |
tree | 93da11bf4ea828611ab5277a7dbadf57724c2b1e /net | |
parent | daebafed7fef54fcc73d2d01431122cfd578d1e0 (diff) | |
parent | 4e2fd555199977c5994d1a4d2d3b8761b20ca4c7 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/ipv4/Kconfig | 2 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 6 | ||||
-rw-r--r-- | net/ipv4/route.c | 60 | ||||
-rw-r--r-- | net/ipv6/route.c | 3 | ||||
-rw-r--r-- | net/rxrpc/ar-connection.c | 12 | ||||
-rw-r--r-- | net/wireless/reg.c | 7 | ||||
-rw-r--r-- | net/wireless/wext.c | 7 |
9 files changed, 51 insertions, 50 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 3779c1438c11..0666a827bc62 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2447,7 +2447,7 @@ static inline void free_SAs(struct pktgen_dev *pkt_dev) | |||
2447 | if (pkt_dev->cflows) { | 2447 | if (pkt_dev->cflows) { |
2448 | /* let go of the SAs if we have them */ | 2448 | /* let go of the SAs if we have them */ |
2449 | int i = 0; | 2449 | int i = 0; |
2450 | for (; i < pkt_dev->nflows; i++){ | 2450 | for (; i < pkt_dev->cflows; i++) { |
2451 | struct xfrm_state *x = pkt_dev->flows[i].x; | 2451 | struct xfrm_state *x = pkt_dev->flows[i].x; |
2452 | if (x) { | 2452 | if (x) { |
2453 | xfrm_state_put(x); | 2453 | xfrm_state_put(x); |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 47fbbb8827d9..d429c41e0dc4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2291,7 +2291,7 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data, | |||
2291 | next_skb: | 2291 | next_skb: |
2292 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; | 2292 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; |
2293 | 2293 | ||
2294 | if (abs_offset < block_limit) { | 2294 | if (abs_offset < block_limit && !st->frag_data) { |
2295 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); | 2295 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); |
2296 | return block_limit - abs_offset; | 2296 | return block_limit - abs_offset; |
2297 | } | 2297 | } |
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 9d26a3da37e5..5b919f7b45db 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -408,7 +408,7 @@ config INET_XFRM_MODE_BEET | |||
408 | 408 | ||
409 | config INET_LRO | 409 | config INET_LRO |
410 | bool "Large Receive Offload (ipv4/tcp)" | 410 | bool "Large Receive Offload (ipv4/tcp)" |
411 | 411 | default y | |
412 | ---help--- | 412 | ---help--- |
413 | Support for Large Receive Offload (ipv4/tcp). | 413 | Support for Large Receive Offload (ipv4/tcp). |
414 | 414 | ||
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 9070d11058e5..538d2a9a5115 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -986,9 +986,12 @@ fib_find_node(struct trie *t, u32 key) | |||
986 | static struct node *trie_rebalance(struct trie *t, struct tnode *tn) | 986 | static struct node *trie_rebalance(struct trie *t, struct tnode *tn) |
987 | { | 987 | { |
988 | int wasfull; | 988 | int wasfull; |
989 | t_key cindex, key = tn->key; | 989 | t_key cindex, key; |
990 | struct tnode *tp; | 990 | struct tnode *tp; |
991 | 991 | ||
992 | preempt_disable(); | ||
993 | key = tn->key; | ||
994 | |||
992 | while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) { | 995 | while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) { |
993 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); | 996 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); |
994 | wasfull = tnode_full(tp, tnode_get_child(tp, cindex)); | 997 | wasfull = tnode_full(tp, tnode_get_child(tp, cindex)); |
@@ -1007,6 +1010,7 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn) | |||
1007 | if (IS_TNODE(tn)) | 1010 | if (IS_TNODE(tn)) |
1008 | tn = (struct tnode *)resize(t, (struct tnode *)tn); | 1011 | tn = (struct tnode *)resize(t, (struct tnode *)tn); |
1009 | 1012 | ||
1013 | preempt_enable(); | ||
1010 | return (struct node *)tn; | 1014 | return (struct node *)tn; |
1011 | } | 1015 | } |
1012 | 1016 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c4c60e9f068a..28205e5bfa9b 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -784,8 +784,8 @@ static void rt_check_expire(void) | |||
784 | { | 784 | { |
785 | static unsigned int rover; | 785 | static unsigned int rover; |
786 | unsigned int i = rover, goal; | 786 | unsigned int i = rover, goal; |
787 | struct rtable *rth, **rthp; | 787 | struct rtable *rth, *aux, **rthp; |
788 | unsigned long length = 0, samples = 0; | 788 | unsigned long samples = 0; |
789 | unsigned long sum = 0, sum2 = 0; | 789 | unsigned long sum = 0, sum2 = 0; |
790 | u64 mult; | 790 | u64 mult; |
791 | 791 | ||
@@ -795,9 +795,9 @@ static void rt_check_expire(void) | |||
795 | goal = (unsigned int)mult; | 795 | goal = (unsigned int)mult; |
796 | if (goal > rt_hash_mask) | 796 | if (goal > rt_hash_mask) |
797 | goal = rt_hash_mask + 1; | 797 | goal = rt_hash_mask + 1; |
798 | length = 0; | ||
799 | for (; goal > 0; goal--) { | 798 | for (; goal > 0; goal--) { |
800 | unsigned long tmo = ip_rt_gc_timeout; | 799 | unsigned long tmo = ip_rt_gc_timeout; |
800 | unsigned long length; | ||
801 | 801 | ||
802 | i = (i + 1) & rt_hash_mask; | 802 | i = (i + 1) & rt_hash_mask; |
803 | rthp = &rt_hash_table[i].chain; | 803 | rthp = &rt_hash_table[i].chain; |
@@ -809,8 +809,10 @@ static void rt_check_expire(void) | |||
809 | 809 | ||
810 | if (*rthp == NULL) | 810 | if (*rthp == NULL) |
811 | continue; | 811 | continue; |
812 | length = 0; | ||
812 | spin_lock_bh(rt_hash_lock_addr(i)); | 813 | spin_lock_bh(rt_hash_lock_addr(i)); |
813 | while ((rth = *rthp) != NULL) { | 814 | while ((rth = *rthp) != NULL) { |
815 | prefetch(rth->u.dst.rt_next); | ||
814 | if (rt_is_expired(rth)) { | 816 | if (rt_is_expired(rth)) { |
815 | *rthp = rth->u.dst.rt_next; | 817 | *rthp = rth->u.dst.rt_next; |
816 | rt_free(rth); | 818 | rt_free(rth); |
@@ -819,33 +821,30 @@ static void rt_check_expire(void) | |||
819 | if (rth->u.dst.expires) { | 821 | if (rth->u.dst.expires) { |
820 | /* Entry is expired even if it is in use */ | 822 | /* Entry is expired even if it is in use */ |
821 | if (time_before_eq(jiffies, rth->u.dst.expires)) { | 823 | if (time_before_eq(jiffies, rth->u.dst.expires)) { |
824 | nofree: | ||
822 | tmo >>= 1; | 825 | tmo >>= 1; |
823 | rthp = &rth->u.dst.rt_next; | 826 | rthp = &rth->u.dst.rt_next; |
824 | /* | 827 | /* |
825 | * Only bump our length if the hash | 828 | * We only count entries on |
826 | * inputs on entries n and n+1 are not | ||
827 | * the same, we only count entries on | ||
828 | * a chain with equal hash inputs once | 829 | * a chain with equal hash inputs once |
829 | * so that entries for different QOS | 830 | * so that entries for different QOS |
830 | * levels, and other non-hash input | 831 | * levels, and other non-hash input |
831 | * attributes don't unfairly skew | 832 | * attributes don't unfairly skew |
832 | * the length computation | 833 | * the length computation |
833 | */ | 834 | */ |
834 | if ((*rthp == NULL) || | 835 | for (aux = rt_hash_table[i].chain;;) { |
835 | !compare_hash_inputs(&(*rthp)->fl, | 836 | if (aux == rth) { |
836 | &rth->fl)) | 837 | length += ONE; |
837 | length += ONE; | 838 | break; |
839 | } | ||
840 | if (compare_hash_inputs(&aux->fl, &rth->fl)) | ||
841 | break; | ||
842 | aux = aux->u.dst.rt_next; | ||
843 | } | ||
838 | continue; | 844 | continue; |
839 | } | 845 | } |
840 | } else if (!rt_may_expire(rth, tmo, ip_rt_gc_timeout)) { | 846 | } else if (!rt_may_expire(rth, tmo, ip_rt_gc_timeout)) |
841 | tmo >>= 1; | 847 | goto nofree; |
842 | rthp = &rth->u.dst.rt_next; | ||
843 | if ((*rthp == NULL) || | ||
844 | !compare_hash_inputs(&(*rthp)->fl, | ||
845 | &rth->fl)) | ||
846 | length += ONE; | ||
847 | continue; | ||
848 | } | ||
849 | 848 | ||
850 | /* Cleanup aged off entries. */ | 849 | /* Cleanup aged off entries. */ |
851 | *rthp = rth->u.dst.rt_next; | 850 | *rthp = rth->u.dst.rt_next; |
@@ -1068,7 +1067,6 @@ out: return 0; | |||
1068 | static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp) | 1067 | static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp) |
1069 | { | 1068 | { |
1070 | struct rtable *rth, **rthp; | 1069 | struct rtable *rth, **rthp; |
1071 | struct rtable *rthi; | ||
1072 | unsigned long now; | 1070 | unsigned long now; |
1073 | struct rtable *cand, **candp; | 1071 | struct rtable *cand, **candp; |
1074 | u32 min_score; | 1072 | u32 min_score; |
@@ -1088,7 +1086,6 @@ restart: | |||
1088 | } | 1086 | } |
1089 | 1087 | ||
1090 | rthp = &rt_hash_table[hash].chain; | 1088 | rthp = &rt_hash_table[hash].chain; |
1091 | rthi = NULL; | ||
1092 | 1089 | ||
1093 | spin_lock_bh(rt_hash_lock_addr(hash)); | 1090 | spin_lock_bh(rt_hash_lock_addr(hash)); |
1094 | while ((rth = *rthp) != NULL) { | 1091 | while ((rth = *rthp) != NULL) { |
@@ -1134,17 +1131,6 @@ restart: | |||
1134 | chain_length++; | 1131 | chain_length++; |
1135 | 1132 | ||
1136 | rthp = &rth->u.dst.rt_next; | 1133 | rthp = &rth->u.dst.rt_next; |
1137 | |||
1138 | /* | ||
1139 | * check to see if the next entry in the chain | ||
1140 | * contains the same hash input values as rt. If it does | ||
1141 | * This is where we will insert into the list, instead of | ||
1142 | * at the head. This groups entries that differ by aspects not | ||
1143 | * relvant to the hash function together, which we use to adjust | ||
1144 | * our chain length | ||
1145 | */ | ||
1146 | if (*rthp && compare_hash_inputs(&(*rthp)->fl, &rt->fl)) | ||
1147 | rthi = rth; | ||
1148 | } | 1134 | } |
1149 | 1135 | ||
1150 | if (cand) { | 1136 | if (cand) { |
@@ -1205,10 +1191,7 @@ restart: | |||
1205 | } | 1191 | } |
1206 | } | 1192 | } |
1207 | 1193 | ||
1208 | if (rthi) | 1194 | rt->u.dst.rt_next = rt_hash_table[hash].chain; |
1209 | rt->u.dst.rt_next = rthi->u.dst.rt_next; | ||
1210 | else | ||
1211 | rt->u.dst.rt_next = rt_hash_table[hash].chain; | ||
1212 | 1195 | ||
1213 | #if RT_CACHE_DEBUG >= 2 | 1196 | #if RT_CACHE_DEBUG >= 2 |
1214 | if (rt->u.dst.rt_next) { | 1197 | if (rt->u.dst.rt_next) { |
@@ -1224,10 +1207,7 @@ restart: | |||
1224 | * previous writes to rt are comitted to memory | 1207 | * previous writes to rt are comitted to memory |
1225 | * before making rt visible to other CPUS. | 1208 | * before making rt visible to other CPUS. |
1226 | */ | 1209 | */ |
1227 | if (rthi) | 1210 | rcu_assign_pointer(rt_hash_table[hash].chain, rt); |
1228 | rcu_assign_pointer(rthi->u.dst.rt_next, rt); | ||
1229 | else | ||
1230 | rcu_assign_pointer(rt_hash_table[hash].chain, rt); | ||
1231 | 1211 | ||
1232 | spin_unlock_bh(rt_hash_lock_addr(hash)); | 1212 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
1233 | *rp = rt; | 1213 | *rp = rt; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 1394ddb6e35c..032a5ec391c5 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -137,6 +137,7 @@ static struct rt6_info ip6_null_entry_template = { | |||
137 | } | 137 | } |
138 | }, | 138 | }, |
139 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), | 139 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), |
140 | .rt6i_protocol = RTPROT_KERNEL, | ||
140 | .rt6i_metric = ~(u32) 0, | 141 | .rt6i_metric = ~(u32) 0, |
141 | .rt6i_ref = ATOMIC_INIT(1), | 142 | .rt6i_ref = ATOMIC_INIT(1), |
142 | }; | 143 | }; |
@@ -159,6 +160,7 @@ static struct rt6_info ip6_prohibit_entry_template = { | |||
159 | } | 160 | } |
160 | }, | 161 | }, |
161 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), | 162 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), |
163 | .rt6i_protocol = RTPROT_KERNEL, | ||
162 | .rt6i_metric = ~(u32) 0, | 164 | .rt6i_metric = ~(u32) 0, |
163 | .rt6i_ref = ATOMIC_INIT(1), | 165 | .rt6i_ref = ATOMIC_INIT(1), |
164 | }; | 166 | }; |
@@ -176,6 +178,7 @@ static struct rt6_info ip6_blk_hole_entry_template = { | |||
176 | } | 178 | } |
177 | }, | 179 | }, |
178 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), | 180 | .rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP), |
181 | .rt6i_protocol = RTPROT_KERNEL, | ||
179 | .rt6i_metric = ~(u32) 0, | 182 | .rt6i_metric = ~(u32) 0, |
180 | .rt6i_ref = ATOMIC_INIT(1), | 183 | .rt6i_ref = ATOMIC_INIT(1), |
181 | }; | 184 | }; |
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 0f1218b8d289..67e38a056240 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c | |||
@@ -343,9 +343,9 @@ static int rxrpc_connect_exclusive(struct rxrpc_sock *rx, | |||
343 | /* not yet present - create a candidate for a new connection | 343 | /* not yet present - create a candidate for a new connection |
344 | * and then redo the check */ | 344 | * and then redo the check */ |
345 | conn = rxrpc_alloc_connection(gfp); | 345 | conn = rxrpc_alloc_connection(gfp); |
346 | if (IS_ERR(conn)) { | 346 | if (!conn) { |
347 | _leave(" = %ld", PTR_ERR(conn)); | 347 | _leave(" = -ENOMEM"); |
348 | return PTR_ERR(conn); | 348 | return -ENOMEM; |
349 | } | 349 | } |
350 | 350 | ||
351 | conn->trans = trans; | 351 | conn->trans = trans; |
@@ -508,9 +508,9 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, | |||
508 | /* not yet present - create a candidate for a new connection and then | 508 | /* not yet present - create a candidate for a new connection and then |
509 | * redo the check */ | 509 | * redo the check */ |
510 | candidate = rxrpc_alloc_connection(gfp); | 510 | candidate = rxrpc_alloc_connection(gfp); |
511 | if (IS_ERR(candidate)) { | 511 | if (!candidate) { |
512 | _leave(" = %ld", PTR_ERR(candidate)); | 512 | _leave(" = -ENOMEM"); |
513 | return PTR_ERR(candidate); | 513 | return -ENOMEM; |
514 | } | 514 | } |
515 | 515 | ||
516 | candidate->trans = trans; | 516 | candidate->trans = trans; |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index df0ced9405d3..f87ac1df2df5 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1680,6 +1680,13 @@ static int regulatory_hint_core(const char *alpha2) | |||
1680 | 1680 | ||
1681 | queue_regulatory_request(request); | 1681 | queue_regulatory_request(request); |
1682 | 1682 | ||
1683 | /* | ||
1684 | * This ensures last_request is populated once modules | ||
1685 | * come swinging in and calling regulatory hints and | ||
1686 | * wiphy_apply_custom_regulatory(). | ||
1687 | */ | ||
1688 | flush_scheduled_work(); | ||
1689 | |||
1683 | return 0; | 1690 | return 0; |
1684 | } | 1691 | } |
1685 | 1692 | ||
diff --git a/net/wireless/wext.c b/net/wireless/wext.c index 22378daceb94..252c2010c2e2 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c | |||
@@ -820,6 +820,13 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, | |||
820 | err = -EFAULT; | 820 | err = -EFAULT; |
821 | goto out; | 821 | goto out; |
822 | } | 822 | } |
823 | |||
824 | if (cmd == SIOCSIWENCODEEXT) { | ||
825 | struct iw_encode_ext *ee = (void *) extra; | ||
826 | |||
827 | if (iwp->length < sizeof(*ee) + ee->key_len) | ||
828 | return -EFAULT; | ||
829 | } | ||
823 | } | 830 | } |
824 | 831 | ||
825 | err = handler(dev, info, (union iwreq_data *) iwp, extra); | 832 | err = handler(dev, info, (union iwreq_data *) iwp, extra); |