diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-23 23:14:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-23 23:15:17 -0400 |
commit | f24001941c99776f41bd3f09c07d91205c2ad9d4 (patch) | |
tree | 0ab31480ccdf343b61db045e195d096068ef7c73 /net | |
parent | a108d5f35adc5c5d5cdc882dc0bb920565551bff (diff) | |
parent | 4d634ca35a8b38530b134ae92bc9e3cc9c23c030 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Fix merge between commit 3adadc08cc1e ("net ax25: Reorder ax25_exit to
remove races") and commit 0ca7a4c87d27 ("net ax25: Simplify and
cleanup the ax25 sysctl handling")
The former moved around the sysctl register/unregister calls, the
later simply removed them.
With help from Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ax25/af_ax25.c | 7 | ||||
-rw-r--r-- | net/core/drop_monitor.c | 1 | ||||
-rw-r--r-- | net/core/net_namespace.c | 33 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 1 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 4 | ||||
-rw-r--r-- | net/mac80211/rx.c | 10 | ||||
-rw-r--r-- | net/sched/sch_gred.c | 7 | ||||
-rw-r--r-- | net/wireless/util.c | 2 |
10 files changed, 40 insertions, 30 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 282eb76bc7d6..051f7abae66d 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -2010,9 +2010,6 @@ static void __exit ax25_exit(void) | |||
2010 | proc_net_remove(&init_net, "ax25_route"); | 2010 | proc_net_remove(&init_net, "ax25_route"); |
2011 | proc_net_remove(&init_net, "ax25"); | 2011 | proc_net_remove(&init_net, "ax25"); |
2012 | proc_net_remove(&init_net, "ax25_calls"); | 2012 | proc_net_remove(&init_net, "ax25_calls"); |
2013 | ax25_rt_free(); | ||
2014 | ax25_uid_free(); | ||
2015 | ax25_dev_free(); | ||
2016 | 2013 | ||
2017 | unregister_netdevice_notifier(&ax25_dev_notifier); | 2014 | unregister_netdevice_notifier(&ax25_dev_notifier); |
2018 | 2015 | ||
@@ -2020,5 +2017,9 @@ static void __exit ax25_exit(void) | |||
2020 | 2017 | ||
2021 | sock_unregister(PF_AX25); | 2018 | sock_unregister(PF_AX25); |
2022 | proto_unregister(&ax25_proto); | 2019 | proto_unregister(&ax25_proto); |
2020 | |||
2021 | ax25_rt_free(); | ||
2022 | ax25_uid_free(); | ||
2023 | ax25_dev_free(); | ||
2023 | } | 2024 | } |
2024 | module_exit(ax25_exit); | 2025 | module_exit(ax25_exit); |
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 7f36b38e060f..5c3c81a609e5 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -150,6 +150,7 @@ static void trace_drop_common(struct sk_buff *skb, void *location) | |||
150 | for (i = 0; i < msg->entries; i++) { | 150 | for (i = 0; i < msg->entries; i++) { |
151 | if (!memcmp(&location, msg->points[i].pc, sizeof(void *))) { | 151 | if (!memcmp(&location, msg->points[i].pc, sizeof(void *))) { |
152 | msg->points[i].count++; | 152 | msg->points[i].count++; |
153 | atomic_inc(&data->dm_hit_count); | ||
153 | goto out; | 154 | goto out; |
154 | } | 155 | } |
155 | } | 156 | } |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 0e950fda9a0a..31a5ae51a45c 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -83,21 +83,29 @@ assign: | |||
83 | 83 | ||
84 | static int ops_init(const struct pernet_operations *ops, struct net *net) | 84 | static int ops_init(const struct pernet_operations *ops, struct net *net) |
85 | { | 85 | { |
86 | int err; | 86 | int err = -ENOMEM; |
87 | void *data = NULL; | ||
88 | |||
87 | if (ops->id && ops->size) { | 89 | if (ops->id && ops->size) { |
88 | void *data = kzalloc(ops->size, GFP_KERNEL); | 90 | data = kzalloc(ops->size, GFP_KERNEL); |
89 | if (!data) | 91 | if (!data) |
90 | return -ENOMEM; | 92 | goto out; |
91 | 93 | ||
92 | err = net_assign_generic(net, *ops->id, data); | 94 | err = net_assign_generic(net, *ops->id, data); |
93 | if (err) { | 95 | if (err) |
94 | kfree(data); | 96 | goto cleanup; |
95 | return err; | ||
96 | } | ||
97 | } | 97 | } |
98 | err = 0; | ||
98 | if (ops->init) | 99 | if (ops->init) |
99 | return ops->init(net); | 100 | err = ops->init(net); |
100 | return 0; | 101 | if (!err) |
102 | return 0; | ||
103 | |||
104 | cleanup: | ||
105 | kfree(data); | ||
106 | |||
107 | out: | ||
108 | return err; | ||
101 | } | 109 | } |
102 | 110 | ||
103 | static void ops_free(const struct pernet_operations *ops, struct net *net) | 111 | static void ops_free(const struct pernet_operations *ops, struct net *net) |
@@ -448,12 +456,7 @@ static void __unregister_pernet_operations(struct pernet_operations *ops) | |||
448 | static int __register_pernet_operations(struct list_head *list, | 456 | static int __register_pernet_operations(struct list_head *list, |
449 | struct pernet_operations *ops) | 457 | struct pernet_operations *ops) |
450 | { | 458 | { |
451 | int err = 0; | 459 | return ops_init(ops, &init_net); |
452 | err = ops_init(ops, &init_net); | ||
453 | if (err) | ||
454 | ops_free(ops, &init_net); | ||
455 | return err; | ||
456 | |||
457 | } | 460 | } |
458 | 461 | ||
459 | static void __unregister_pernet_operations(struct pernet_operations *ops) | 462 | static void __unregister_pernet_operations(struct pernet_operations *ops) |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index bd7aef59c385..c1c611b385a7 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -335,6 +335,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) | |||
335 | incr = __tcp_grow_window(sk, skb); | 335 | incr = __tcp_grow_window(sk, skb); |
336 | 336 | ||
337 | if (incr) { | 337 | if (incr) { |
338 | incr = max_t(int, incr, 2 * skb->len); | ||
338 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, | 339 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, |
339 | tp->window_clamp); | 340 | tp->window_clamp); |
340 | inet_csk(sk)->icsk_ack.quick |= 1; | 341 | inet_csk(sk)->icsk_ack.quick |= 1; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 57a834cafca1..7b7cf3811348 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1096,6 +1096,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len) | |||
1096 | eat = min_t(int, len, skb_headlen(skb)); | 1096 | eat = min_t(int, len, skb_headlen(skb)); |
1097 | if (eat) { | 1097 | if (eat) { |
1098 | __skb_pull(skb, eat); | 1098 | __skb_pull(skb, eat); |
1099 | skb->avail_size -= eat; | ||
1099 | len -= eat; | 1100 | len -= eat; |
1100 | if (!len) | 1101 | if (!len) |
1101 | return; | 1102 | return; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 5fb19d345cfd..cdbf292ad208 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1383,6 +1383,10 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1383 | tcp_mtup_init(newsk); | 1383 | tcp_mtup_init(newsk); |
1384 | tcp_sync_mss(newsk, dst_mtu(dst)); | 1384 | tcp_sync_mss(newsk, dst_mtu(dst)); |
1385 | newtp->advmss = dst_metric_advmss(dst); | 1385 | newtp->advmss = dst_metric_advmss(dst); |
1386 | if (tcp_sk(sk)->rx_opt.user_mss && | ||
1387 | tcp_sk(sk)->rx_opt.user_mss < newtp->advmss) | ||
1388 | newtp->advmss = tcp_sk(sk)->rx_opt.user_mss; | ||
1389 | |||
1386 | tcp_initialize_rcv_mss(newsk); | 1390 | tcp_initialize_rcv_mss(newsk); |
1387 | if (tcp_rsk(req)->snt_synack) | 1391 | if (tcp_rsk(req)->snt_synack) |
1388 | tcp_valid_rtt_meas(newsk, | 1392 | tcp_valid_rtt_meas(newsk, |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 49a207980338..61cd391c32a3 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -455,8 +455,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
455 | * fall back to HT20 if we don't use or use | 455 | * fall back to HT20 if we don't use or use |
456 | * the other extension channel | 456 | * the other extension channel |
457 | */ | 457 | */ |
458 | if ((channel_type == NL80211_CHAN_HT40MINUS || | 458 | if (!(channel_type == NL80211_CHAN_HT40MINUS || |
459 | channel_type == NL80211_CHAN_HT40PLUS) && | 459 | channel_type == NL80211_CHAN_HT40PLUS) || |
460 | channel_type != sdata->u.ibss.channel_type) | 460 | channel_type != sdata->u.ibss.channel_type) |
461 | sta_ht_cap_new.cap &= | 461 | sta_ht_cap_new.cap &= |
462 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 462 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 54a049123a60..7cbb4aad0577 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -103,7 +103,7 @@ static void | |||
103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | 103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, |
104 | struct sk_buff *skb, | 104 | struct sk_buff *skb, |
105 | struct ieee80211_rate *rate, | 105 | struct ieee80211_rate *rate, |
106 | int rtap_len) | 106 | int rtap_len, bool has_fcs) |
107 | { | 107 | { |
108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | 108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
109 | struct ieee80211_radiotap_header *rthdr; | 109 | struct ieee80211_radiotap_header *rthdr; |
@@ -134,7 +134,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /* IEEE80211_RADIOTAP_FLAGS */ | 136 | /* IEEE80211_RADIOTAP_FLAGS */ |
137 | if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) | 137 | if (has_fcs && (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)) |
138 | *pos |= IEEE80211_RADIOTAP_F_FCS; | 138 | *pos |= IEEE80211_RADIOTAP_F_FCS; |
139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) | 139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) |
140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; | 140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; |
@@ -294,7 +294,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
294 | } | 294 | } |
295 | 295 | ||
296 | /* prepend radiotap information */ | 296 | /* prepend radiotap information */ |
297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
298 | true); | ||
298 | 299 | ||
299 | skb_reset_mac_header(skb); | 300 | skb_reset_mac_header(skb); |
300 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 301 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -2567,7 +2568,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2567 | goto out_free_skb; | 2568 | goto out_free_skb; |
2568 | 2569 | ||
2569 | /* prepend radiotap information */ | 2570 | /* prepend radiotap information */ |
2570 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 2571 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
2572 | false); | ||
2571 | 2573 | ||
2572 | skb_set_mac_header(skb, 0); | 2574 | skb_set_mac_header(skb, 0); |
2573 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 2575 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 55e3310edc94..ab620bf90785 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -567,11 +567,8 @@ static int gred_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
567 | opt.packets = q->packetsin; | 567 | opt.packets = q->packetsin; |
568 | opt.bytesin = q->bytesin; | 568 | opt.bytesin = q->bytesin; |
569 | 569 | ||
570 | if (gred_wred_mode(table)) { | 570 | if (gred_wred_mode(table)) |
571 | q->vars.qidlestart = | 571 | gred_load_wred_set(table, q); |
572 | table->tab[table->def]->vars.qidlestart; | ||
573 | q->vars.qavg = table->tab[table->def]->vars.qavg; | ||
574 | } | ||
575 | 572 | ||
576 | opt.qave = red_calc_qavg(&q->parms, &q->vars, q->vars.qavg); | 573 | opt.qave = red_calc_qavg(&q->parms, &q->vars, q->vars.qavg); |
577 | 574 | ||
diff --git a/net/wireless/util.c b/net/wireless/util.c index ffced852284d..6cba00173a2f 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -985,7 +985,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | |||
985 | if (rdev->wiphy.software_iftypes & BIT(iftype)) | 985 | if (rdev->wiphy.software_iftypes & BIT(iftype)) |
986 | continue; | 986 | continue; |
987 | for (j = 0; j < c->n_limits; j++) { | 987 | for (j = 0; j < c->n_limits; j++) { |
988 | if (!(limits[j].types & iftype)) | 988 | if (!(limits[j].types & BIT(iftype))) |
989 | continue; | 989 | continue; |
990 | if (limits[j].max < num[iftype]) | 990 | if (limits[j].max < num[iftype]) |
991 | goto cont; | 991 | goto cont; |