diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
commit | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch) | |
tree | 9f54936c87764bef75e97395cb56b7d1e0df24c6 /net | |
parent | 4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff) | |
parent | 6be325719b3e54624397e413efd4b33a997e55a3 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/appletalk/aarp.c | 2 | ||||
-rw-r--r-- | net/ax25/ax25_out.c | 6 | ||||
-rw-r--r-- | net/dccp/ccid.c | 18 | ||||
-rw-r--r-- | net/dccp/ccid.h | 2 | ||||
-rw-r--r-- | net/dccp/probe.c | 3 | ||||
-rw-r--r-- | net/ipv4/inet_diag.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 7 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/iface.c | 10 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 4 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 2 | ||||
-rw-r--r-- | net/mac80211/rx.c | 4 | ||||
-rw-r--r-- | net/netrom/nr_route.c | 11 | ||||
-rw-r--r-- | net/packet/af_packet.c | 19 | ||||
-rw-r--r-- | net/rose/rose_link.c | 8 | ||||
-rw-r--r-- | net/rose/rose_route.c | 5 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 17 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_mech.c | 4 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 3 | ||||
-rw-r--r-- | net/wireless/core.c | 4 | ||||
-rw-r--r-- | net/wireless/sme.c | 1 |
23 files changed, 101 insertions, 38 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 9d4adfd22757..f2b3b56aa779 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -819,7 +819,7 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, | |||
819 | ma = &ifa->address; | 819 | ma = &ifa->address; |
820 | else { /* We need to make a copy of the entry. */ | 820 | else { /* We need to make a copy of the entry. */ |
821 | da.s_node = sa.s_node; | 821 | da.s_node = sa.s_node; |
822 | da.s_net = da.s_net; | 822 | da.s_net = sa.s_net; |
823 | ma = &da; | 823 | ma = &da; |
824 | } | 824 | } |
825 | 825 | ||
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index bf706f83a5c9..14912600ec57 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c | |||
@@ -92,6 +92,12 @@ ax25_cb *ax25_send_frame(struct sk_buff *skb, int paclen, ax25_address *src, ax2 | |||
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
95 | /* | ||
96 | * There is one ref for the state machine; a caller needs | ||
97 | * one more to put it back, just like with the existing one. | ||
98 | */ | ||
99 | ax25_cb_hold(ax25); | ||
100 | |||
95 | ax25_cb_add(ax25); | 101 | ax25_cb_add(ax25); |
96 | 102 | ||
97 | ax25->state = AX25_STATE_1; | 103 | ax25->state = AX25_STATE_1; |
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index f3e9ba1cfd01..57dfb9c8c4f2 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c | |||
@@ -77,34 +77,24 @@ int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, | |||
77 | return err; | 77 | return err; |
78 | } | 78 | } |
79 | 79 | ||
80 | static struct kmem_cache *ccid_kmem_cache_create(int obj_size, const char *fmt,...) | 80 | static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) |
81 | { | 81 | { |
82 | struct kmem_cache *slab; | 82 | struct kmem_cache *slab; |
83 | char slab_name_fmt[32], *slab_name; | ||
84 | va_list args; | 83 | va_list args; |
85 | 84 | ||
86 | va_start(args, fmt); | 85 | va_start(args, fmt); |
87 | vsnprintf(slab_name_fmt, sizeof(slab_name_fmt), fmt, args); | 86 | vsnprintf(slab_name_fmt, sizeof(slab_name_fmt), fmt, args); |
88 | va_end(args); | 87 | va_end(args); |
89 | 88 | ||
90 | slab_name = kstrdup(slab_name_fmt, GFP_KERNEL); | 89 | slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0, |
91 | if (slab_name == NULL) | ||
92 | return NULL; | ||
93 | slab = kmem_cache_create(slab_name, sizeof(struct ccid) + obj_size, 0, | ||
94 | SLAB_HWCACHE_ALIGN, NULL); | 90 | SLAB_HWCACHE_ALIGN, NULL); |
95 | if (slab == NULL) | ||
96 | kfree(slab_name); | ||
97 | return slab; | 91 | return slab; |
98 | } | 92 | } |
99 | 93 | ||
100 | static void ccid_kmem_cache_destroy(struct kmem_cache *slab) | 94 | static void ccid_kmem_cache_destroy(struct kmem_cache *slab) |
101 | { | 95 | { |
102 | if (slab != NULL) { | 96 | if (slab != NULL) |
103 | const char *name = kmem_cache_name(slab); | ||
104 | |||
105 | kmem_cache_destroy(slab); | 97 | kmem_cache_destroy(slab); |
106 | kfree(name); | ||
107 | } | ||
108 | } | 98 | } |
109 | 99 | ||
110 | static int ccid_activate(struct ccid_operations *ccid_ops) | 100 | static int ccid_activate(struct ccid_operations *ccid_ops) |
@@ -113,6 +103,7 @@ static int ccid_activate(struct ccid_operations *ccid_ops) | |||
113 | 103 | ||
114 | ccid_ops->ccid_hc_rx_slab = | 104 | ccid_ops->ccid_hc_rx_slab = |
115 | ccid_kmem_cache_create(ccid_ops->ccid_hc_rx_obj_size, | 105 | ccid_kmem_cache_create(ccid_ops->ccid_hc_rx_obj_size, |
106 | ccid_ops->ccid_hc_rx_slab_name, | ||
116 | "ccid%u_hc_rx_sock", | 107 | "ccid%u_hc_rx_sock", |
117 | ccid_ops->ccid_id); | 108 | ccid_ops->ccid_id); |
118 | if (ccid_ops->ccid_hc_rx_slab == NULL) | 109 | if (ccid_ops->ccid_hc_rx_slab == NULL) |
@@ -120,6 +111,7 @@ static int ccid_activate(struct ccid_operations *ccid_ops) | |||
120 | 111 | ||
121 | ccid_ops->ccid_hc_tx_slab = | 112 | ccid_ops->ccid_hc_tx_slab = |
122 | ccid_kmem_cache_create(ccid_ops->ccid_hc_tx_obj_size, | 113 | ccid_kmem_cache_create(ccid_ops->ccid_hc_tx_obj_size, |
114 | ccid_ops->ccid_hc_tx_slab_name, | ||
123 | "ccid%u_hc_tx_sock", | 115 | "ccid%u_hc_tx_sock", |
124 | ccid_ops->ccid_id); | 116 | ccid_ops->ccid_id); |
125 | if (ccid_ops->ccid_hc_tx_slab == NULL) | 117 | if (ccid_ops->ccid_hc_tx_slab == NULL) |
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index facedd20b531..269958bf7fe9 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
@@ -49,6 +49,8 @@ struct ccid_operations { | |||
49 | const char *ccid_name; | 49 | const char *ccid_name; |
50 | struct kmem_cache *ccid_hc_rx_slab, | 50 | struct kmem_cache *ccid_hc_rx_slab, |
51 | *ccid_hc_tx_slab; | 51 | *ccid_hc_tx_slab; |
52 | char ccid_hc_rx_slab_name[32]; | ||
53 | char ccid_hc_tx_slab_name[32]; | ||
52 | __u32 ccid_hc_rx_obj_size, | 54 | __u32 ccid_hc_rx_obj_size, |
53 | ccid_hc_tx_obj_size; | 55 | ccid_hc_tx_obj_size; |
54 | /* Interface Routines */ | 56 | /* Interface Routines */ |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index a1362dc8abb0..bace1d8cbcfd 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -161,7 +161,8 @@ static __init int dccpprobe_init(void) | |||
161 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) | 161 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) |
162 | goto err0; | 162 | goto err0; |
163 | 163 | ||
164 | ret = register_jprobe(&dccp_send_probe); | 164 | ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0), |
165 | "dccp"); | ||
165 | if (ret) | 166 | if (ret) |
166 | goto err1; | 167 | goto err1; |
167 | 168 | ||
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index bdb78dd180ce..1aaa8110d84b 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -368,7 +368,7 @@ static int inet_diag_bc_run(const void *bc, int len, | |||
368 | yes = entry->sport >= op[1].no; | 368 | yes = entry->sport >= op[1].no; |
369 | break; | 369 | break; |
370 | case INET_DIAG_BC_S_LE: | 370 | case INET_DIAG_BC_S_LE: |
371 | yes = entry->dport <= op[1].no; | 371 | yes = entry->sport <= op[1].no; |
372 | break; | 372 | break; |
373 | case INET_DIAG_BC_D_GE: | 373 | case INET_DIAG_BC_D_GE: |
374 | yes = entry->dport >= op[1].no; | 374 | yes = entry->dport >= op[1].no; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1cc339441e7d..b16dfadbe6d6 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -586,7 +586,9 @@ static void __net_exit ip_rt_do_proc_exit(struct net *net) | |||
586 | { | 586 | { |
587 | remove_proc_entry("rt_cache", net->proc_net_stat); | 587 | remove_proc_entry("rt_cache", net->proc_net_stat); |
588 | remove_proc_entry("rt_cache", net->proc_net); | 588 | remove_proc_entry("rt_cache", net->proc_net); |
589 | #ifdef CONFIG_NET_CLS_ROUTE | ||
589 | remove_proc_entry("rt_acct", net->proc_net); | 590 | remove_proc_entry("rt_acct", net->proc_net); |
591 | #endif | ||
590 | } | 592 | } |
591 | 593 | ||
592 | static struct pernet_operations ip_rt_proc_ops __net_initdata = { | 594 | static struct pernet_operations ip_rt_proc_ops __net_initdata = { |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index df159fffe4bc..4bac362b1335 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -559,6 +559,11 @@ static inline struct inet6_dev *ipv6_skb_idev(struct sk_buff *skb) | |||
559 | return skb_dst(skb) ? ip6_dst_idev(skb_dst(skb)) : __in6_dev_get(skb->dev); | 559 | return skb_dst(skb) ? ip6_dst_idev(skb_dst(skb)) : __in6_dev_get(skb->dev); |
560 | } | 560 | } |
561 | 561 | ||
562 | static inline struct net *ipv6_skb_net(struct sk_buff *skb) | ||
563 | { | ||
564 | return skb_dst(skb) ? dev_net(skb_dst(skb)->dev) : dev_net(skb->dev); | ||
565 | } | ||
566 | |||
562 | /* Router Alert as of RFC 2711 */ | 567 | /* Router Alert as of RFC 2711 */ |
563 | 568 | ||
564 | static int ipv6_hop_ra(struct sk_buff *skb, int optoff) | 569 | static int ipv6_hop_ra(struct sk_buff *skb, int optoff) |
@@ -580,8 +585,8 @@ static int ipv6_hop_ra(struct sk_buff *skb, int optoff) | |||
580 | static int ipv6_hop_jumbo(struct sk_buff *skb, int optoff) | 585 | static int ipv6_hop_jumbo(struct sk_buff *skb, int optoff) |
581 | { | 586 | { |
582 | const unsigned char *nh = skb_network_header(skb); | 587 | const unsigned char *nh = skb_network_header(skb); |
588 | struct net *net = ipv6_skb_net(skb); | ||
583 | u32 pkt_len; | 589 | u32 pkt_len; |
584 | struct net *net = dev_net(skb_dst(skb)->dev); | ||
585 | 590 | ||
586 | if (nh[optoff + 1] != 4 || (optoff & 3) != 2) { | 591 | if (nh[optoff + 1] != 4 || (optoff & 3) != 2) { |
587 | LIMIT_NETDEBUG(KERN_DEBUG "ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", | 592 | LIMIT_NETDEBUG(KERN_DEBUG "ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n", |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b0102c538b30..facf233843e0 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1389,6 +1389,9 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
1389 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 1389 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
1390 | struct ieee80211_conf *conf = &local->hw.conf; | 1390 | struct ieee80211_conf *conf = &local->hw.conf; |
1391 | 1391 | ||
1392 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
1393 | return -EOPNOTSUPP; | ||
1394 | |||
1392 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) | 1395 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) |
1393 | return -EOPNOTSUPP; | 1396 | return -EOPNOTSUPP; |
1394 | 1397 | ||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index fe140bf033f9..edf21cebeee8 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -684,21 +684,25 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev, | |||
684 | struct ieee80211_local *local = sdata->local; | 684 | struct ieee80211_local *local = sdata->local; |
685 | struct ieee80211_hdr *hdr; | 685 | struct ieee80211_hdr *hdr; |
686 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; | 686 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; |
687 | u8 *p; | ||
687 | 688 | ||
688 | if (local->hw.queues < 4) | 689 | if (local->hw.queues < 4) |
689 | return 0; | 690 | return 0; |
690 | 691 | ||
691 | if (skb->len < 4 || | 692 | if (skb->len < 4 || |
692 | skb->len < rtap->it_len + 2 /* frame control */) | 693 | skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */) |
693 | return 0; /* doesn't matter, frame will be dropped */ | 694 | return 0; /* doesn't matter, frame will be dropped */ |
694 | 695 | ||
695 | hdr = (void *)((u8 *)skb->data + rtap->it_len); | 696 | hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len)); |
696 | 697 | ||
697 | if (!ieee80211_is_data(hdr->frame_control)) { | 698 | if (!ieee80211_is_data_qos(hdr->frame_control)) { |
698 | skb->priority = 7; | 699 | skb->priority = 7; |
699 | return ieee802_1d_to_ac[skb->priority]; | 700 | return ieee802_1d_to_ac[skb->priority]; |
700 | } | 701 | } |
701 | 702 | ||
703 | p = ieee80211_get_qos_ctl(hdr); | ||
704 | skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK; | ||
705 | |||
702 | return ieee80211_downgrade_queue(local, skb); | 706 | return ieee80211_downgrade_queue(local, skb); |
703 | } | 707 | } |
704 | 708 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a82564e73d91..1e1d16c55ee5 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1478,7 +1478,9 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1478 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); | 1478 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); |
1479 | break; | 1479 | break; |
1480 | case IEEE80211_STYPE_ACTION: | 1480 | case IEEE80211_STYPE_ACTION: |
1481 | /* XXX: differentiate, can only happen for CSA now! */ | 1481 | if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) |
1482 | break; | ||
1483 | |||
1482 | ieee80211_sta_process_chanswitch(sdata, | 1484 | ieee80211_sta_process_chanswitch(sdata, |
1483 | &mgmt->u.action.u.chan_switch.sw_elem, | 1485 | &mgmt->u.action.u.chan_switch.sw_elem, |
1484 | (void *)ifmgd->associated->priv); | 1486 | (void *)ifmgd->associated->priv); |
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 699d3ed869c4..29bc4c516238 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -190,7 +190,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, | |||
190 | rate_control_pid_normalize(pinfo, sband->n_bitrates); | 190 | rate_control_pid_normalize(pinfo, sband->n_bitrates); |
191 | 191 | ||
192 | /* Compute the proportional, integral and derivative errors. */ | 192 | /* Compute the proportional, integral and derivative errors. */ |
193 | err_prop = (pinfo->target << RC_PID_ARITH_SHIFT) - pf; | 193 | err_prop = (pinfo->target - pf) << RC_PID_ARITH_SHIFT; |
194 | 194 | ||
195 | err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; | 195 | err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; |
196 | spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; | 196 | spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index efa6d3689c5e..a8e15b84c05b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1946,6 +1946,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1946 | } | 1946 | } |
1947 | break; | 1947 | break; |
1948 | default: | 1948 | default: |
1949 | /* do not process rejected action frames */ | ||
1950 | if (mgmt->u.action.category & 0x80) | ||
1951 | return RX_DROP_MONITOR; | ||
1952 | |||
1949 | return RX_CONTINUE; | 1953 | return RX_CONTINUE; |
1950 | } | 1954 | } |
1951 | 1955 | ||
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index aacba76070fc..e2e2d33cafdf 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -843,12 +843,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
843 | dptr = skb_push(skb, 1); | 843 | dptr = skb_push(skb, 1); |
844 | *dptr = AX25_P_NETROM; | 844 | *dptr = AX25_P_NETROM; |
845 | 845 | ||
846 | ax25s = ax25_send_frame(skb, 256, (ax25_address *)dev->dev_addr, &nr_neigh->callsign, nr_neigh->digipeat, nr_neigh->dev); | 846 | ax25s = nr_neigh->ax25; |
847 | if (nr_neigh->ax25 && ax25s) { | 847 | nr_neigh->ax25 = ax25_send_frame(skb, 256, |
848 | /* We were already holding this ax25_cb */ | 848 | (ax25_address *)dev->dev_addr, |
849 | &nr_neigh->callsign, | ||
850 | nr_neigh->digipeat, nr_neigh->dev); | ||
851 | if (ax25s) | ||
849 | ax25_cb_put(ax25s); | 852 | ax25_cb_put(ax25s); |
850 | } | ||
851 | nr_neigh->ax25 = ax25s; | ||
852 | 853 | ||
853 | dev_put(dev); | 854 | dev_put(dev); |
854 | ret = (nr_neigh->ax25 != NULL); | 855 | ret = (nr_neigh->ax25 != NULL); |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index a97acfe7e770..53633c5fdb1d 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -1021,8 +1021,20 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg) | |||
1021 | 1021 | ||
1022 | status = TP_STATUS_SEND_REQUEST; | 1022 | status = TP_STATUS_SEND_REQUEST; |
1023 | err = dev_queue_xmit(skb); | 1023 | err = dev_queue_xmit(skb); |
1024 | if (unlikely(err > 0 && (err = net_xmit_errno(err)) != 0)) | 1024 | if (unlikely(err > 0)) { |
1025 | goto out_xmit; | 1025 | err = net_xmit_errno(err); |
1026 | if (err && __packet_get_status(po, ph) == | ||
1027 | TP_STATUS_AVAILABLE) { | ||
1028 | /* skb was destructed already */ | ||
1029 | skb = NULL; | ||
1030 | goto out_status; | ||
1031 | } | ||
1032 | /* | ||
1033 | * skb was dropped but not destructed yet; | ||
1034 | * let's treat it like congestion or err < 0 | ||
1035 | */ | ||
1036 | err = 0; | ||
1037 | } | ||
1026 | packet_increment_head(&po->tx_ring); | 1038 | packet_increment_head(&po->tx_ring); |
1027 | len_sum += tp_len; | 1039 | len_sum += tp_len; |
1028 | } while (likely((ph != NULL) || | 1040 | } while (likely((ph != NULL) || |
@@ -1033,9 +1045,6 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg) | |||
1033 | err = len_sum; | 1045 | err = len_sum; |
1034 | goto out_put; | 1046 | goto out_put; |
1035 | 1047 | ||
1036 | out_xmit: | ||
1037 | skb->destructor = sock_wfree; | ||
1038 | atomic_dec(&po->tx_ring.pending); | ||
1039 | out_status: | 1048 | out_status: |
1040 | __packet_set_status(po, ph, status); | 1049 | __packet_set_status(po, ph, status); |
1041 | kfree_skb(skb); | 1050 | kfree_skb(skb); |
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index bd86a63960ce..5ef5f6988a2e 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -101,13 +101,17 @@ static void rose_t0timer_expiry(unsigned long param) | |||
101 | static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) | 101 | static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) |
102 | { | 102 | { |
103 | ax25_address *rose_call; | 103 | ax25_address *rose_call; |
104 | ax25_cb *ax25s; | ||
104 | 105 | ||
105 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) | 106 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) |
106 | rose_call = (ax25_address *)neigh->dev->dev_addr; | 107 | rose_call = (ax25_address *)neigh->dev->dev_addr; |
107 | else | 108 | else |
108 | rose_call = &rose_callsign; | 109 | rose_call = &rose_callsign; |
109 | 110 | ||
111 | ax25s = neigh->ax25; | ||
110 | neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); | 112 | neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); |
113 | if (ax25s) | ||
114 | ax25_cb_put(ax25s); | ||
111 | 115 | ||
112 | return (neigh->ax25 != NULL); | 116 | return (neigh->ax25 != NULL); |
113 | } | 117 | } |
@@ -120,13 +124,17 @@ static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) | |||
120 | static int rose_link_up(struct rose_neigh *neigh) | 124 | static int rose_link_up(struct rose_neigh *neigh) |
121 | { | 125 | { |
122 | ax25_address *rose_call; | 126 | ax25_address *rose_call; |
127 | ax25_cb *ax25s; | ||
123 | 128 | ||
124 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) | 129 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) |
125 | rose_call = (ax25_address *)neigh->dev->dev_addr; | 130 | rose_call = (ax25_address *)neigh->dev->dev_addr; |
126 | else | 131 | else |
127 | rose_call = &rose_callsign; | 132 | rose_call = &rose_callsign; |
128 | 133 | ||
134 | ax25s = neigh->ax25; | ||
129 | neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); | 135 | neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); |
136 | if (ax25s) | ||
137 | ax25_cb_put(ax25s); | ||
130 | 138 | ||
131 | return (neigh->ax25 != NULL); | 139 | return (neigh->ax25 != NULL); |
132 | } | 140 | } |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 795c4b025e31..70a0b3b4b4d2 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -235,6 +235,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
235 | 235 | ||
236 | if ((s = rose_neigh_list) == rose_neigh) { | 236 | if ((s = rose_neigh_list) == rose_neigh) { |
237 | rose_neigh_list = rose_neigh->next; | 237 | rose_neigh_list = rose_neigh->next; |
238 | if (rose_neigh->ax25) | ||
239 | ax25_cb_put(rose_neigh->ax25); | ||
238 | kfree(rose_neigh->digipeat); | 240 | kfree(rose_neigh->digipeat); |
239 | kfree(rose_neigh); | 241 | kfree(rose_neigh); |
240 | return; | 242 | return; |
@@ -243,6 +245,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
243 | while (s != NULL && s->next != NULL) { | 245 | while (s != NULL && s->next != NULL) { |
244 | if (s->next == rose_neigh) { | 246 | if (s->next == rose_neigh) { |
245 | s->next = rose_neigh->next; | 247 | s->next = rose_neigh->next; |
248 | if (rose_neigh->ax25) | ||
249 | ax25_cb_put(rose_neigh->ax25); | ||
246 | kfree(rose_neigh->digipeat); | 250 | kfree(rose_neigh->digipeat); |
247 | kfree(rose_neigh); | 251 | kfree(rose_neigh); |
248 | return; | 252 | return; |
@@ -812,6 +816,7 @@ void rose_link_failed(ax25_cb *ax25, int reason) | |||
812 | 816 | ||
813 | if (rose_neigh != NULL) { | 817 | if (rose_neigh != NULL) { |
814 | rose_neigh->ax25 = NULL; | 818 | rose_neigh->ax25 = NULL; |
819 | ax25_cb_put(ax25); | ||
815 | 820 | ||
816 | rose_del_route_by_neigh(rose_neigh); | 821 | rose_del_route_by_neigh(rose_neigh); |
817 | rose_kill_by_neigh(rose_neigh); | 822 | rose_kill_by_neigh(rose_neigh); |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 3c3c50f38a1c..f7a7f8380e38 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -644,7 +644,22 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | |||
644 | p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); | 644 | p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); |
645 | if (IS_ERR(p)) { | 645 | if (IS_ERR(p)) { |
646 | err = PTR_ERR(p); | 646 | err = PTR_ERR(p); |
647 | gss_msg->msg.errno = (err == -EAGAIN) ? -EAGAIN : -EACCES; | 647 | switch (err) { |
648 | case -EACCES: | ||
649 | gss_msg->msg.errno = err; | ||
650 | err = mlen; | ||
651 | break; | ||
652 | case -EFAULT: | ||
653 | case -ENOMEM: | ||
654 | case -EINVAL: | ||
655 | case -ENOSYS: | ||
656 | gss_msg->msg.errno = -EAGAIN; | ||
657 | break; | ||
658 | default: | ||
659 | printk(KERN_CRIT "%s: bad return from " | ||
660 | "gss_fill_context: %zd\n", __func__, err); | ||
661 | BUG(); | ||
662 | } | ||
648 | goto err_release_msg; | 663 | goto err_release_msg; |
649 | } | 664 | } |
650 | gss_msg->ctx = gss_get_ctx(ctx); | 665 | gss_msg->ctx = gss_get_ctx(ctx); |
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index ef45eba22485..2deb0ed72ff4 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c | |||
@@ -131,8 +131,10 @@ gss_import_sec_context_kerberos(const void *p, | |||
131 | struct krb5_ctx *ctx; | 131 | struct krb5_ctx *ctx; |
132 | int tmp; | 132 | int tmp; |
133 | 133 | ||
134 | if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS))) | 134 | if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS))) { |
135 | p = ERR_PTR(-ENOMEM); | ||
135 | goto out_err; | 136 | goto out_err; |
137 | } | ||
136 | 138 | ||
137 | p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); | 139 | p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); |
138 | if (IS_ERR(p)) | 140 | if (IS_ERR(p)) |
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 6efbb0cd3c7c..76e4c6f4ac3c 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -252,7 +252,7 @@ gss_import_sec_context(const void *input_token, size_t bufsize, | |||
252 | struct gss_ctx **ctx_id) | 252 | struct gss_ctx **ctx_id) |
253 | { | 253 | { |
254 | if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL))) | 254 | if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL))) |
255 | return GSS_S_FAILURE; | 255 | return -ENOMEM; |
256 | (*ctx_id)->mech_type = gss_mech_get(mech); | 256 | (*ctx_id)->mech_type = gss_mech_get(mech); |
257 | 257 | ||
258 | return mech->gm_ops | 258 | return mech->gm_ops |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 1c924ee0a1ef..7d1f9e928f69 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -699,7 +699,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout) | |||
699 | spin_unlock_bh(&pool->sp_lock); | 699 | spin_unlock_bh(&pool->sp_lock); |
700 | 700 | ||
701 | len = 0; | 701 | len = 0; |
702 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) { | 702 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags) && |
703 | !test_bit(XPT_CLOSE, &xprt->xpt_flags)) { | ||
703 | struct svc_xprt *newxpt; | 704 | struct svc_xprt *newxpt; |
704 | newxpt = xprt->xpt_ops->xpo_accept(xprt); | 705 | newxpt = xprt->xpt_ops->xpo_accept(xprt); |
705 | if (newxpt) { | 706 | if (newxpt) { |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 0a545bb6ed05..20db90246de5 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -746,9 +746,9 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
746 | mutex_unlock(&rdev->devlist_mtx); | 746 | mutex_unlock(&rdev->devlist_mtx); |
747 | dev_put(dev); | 747 | dev_put(dev); |
748 | } | 748 | } |
749 | #ifdef CONFIG_CFG80211_WEXT | ||
750 | cfg80211_lock_rdev(rdev); | 749 | cfg80211_lock_rdev(rdev); |
751 | mutex_lock(&rdev->devlist_mtx); | 750 | mutex_lock(&rdev->devlist_mtx); |
751 | #ifdef CONFIG_CFG80211_WEXT | ||
752 | wdev_lock(wdev); | 752 | wdev_lock(wdev); |
753 | switch (wdev->iftype) { | 753 | switch (wdev->iftype) { |
754 | case NL80211_IFTYPE_ADHOC: | 754 | case NL80211_IFTYPE_ADHOC: |
@@ -761,10 +761,10 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | wdev_unlock(wdev); | 763 | wdev_unlock(wdev); |
764 | #endif | ||
764 | rdev->opencount++; | 765 | rdev->opencount++; |
765 | mutex_unlock(&rdev->devlist_mtx); | 766 | mutex_unlock(&rdev->devlist_mtx); |
766 | cfg80211_unlock_rdev(rdev); | 767 | cfg80211_unlock_rdev(rdev); |
767 | #endif | ||
768 | break; | 768 | break; |
769 | case NETDEV_UNREGISTER: | 769 | case NETDEV_UNREGISTER: |
770 | /* | 770 | /* |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 2ce5e1609a3d..745c37e7992e 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -656,6 +656,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
656 | memset(&wrqu, 0, sizeof(wrqu)); | 656 | memset(&wrqu, 0, sizeof(wrqu)); |
657 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 657 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
658 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | 658 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); |
659 | wdev->wext.connect.ssid_len = 0; | ||
659 | #endif | 660 | #endif |
660 | } | 661 | } |
661 | 662 | ||