diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-12 20:44:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-12 20:44:53 -0400 |
commit | aa11d958d1a6572eda08214d7c6a735804fe48a5 (patch) | |
tree | d025b05270ad1e010660d17eeadc6ac3c1abbd7d /net | |
parent | 07f6642ee9418e962e54cbc07471cfe2e559c568 (diff) | |
parent | 9799218ae36910af50f002a5db1802d576fffb43 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
arch/microblaze/include/asm/socket.h
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 13 | ||||
-rw-r--r-- | net/appletalk/ddp.c | 2 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 27 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/sock.c | 2 | ||||
-rw-r--r-- | net/can/raw.c | 1 | ||||
-rw-r--r-- | net/core/dev.c | 23 | ||||
-rw-r--r-- | net/core/net_namespace.c | 2 | ||||
-rw-r--r-- | net/dccp/proto.c | 5 | ||||
-rw-r--r-- | net/econet/af_econet.c | 1 | ||||
-rw-r--r-- | net/ieee802154/af_ieee802154.c | 8 | ||||
-rw-r--r-- | net/ieee802154/dgram.c | 14 | ||||
-rw-r--r-- | net/ieee802154/raw.c | 14 | ||||
-rw-r--r-- | net/ipx/af_ipx.c | 1 | ||||
-rw-r--r-- | net/irda/af_irda.c | 2 | ||||
-rw-r--r-- | net/irda/irnet/irnet.h | 1 | ||||
-rw-r--r-- | net/irda/irnet/irnet_ppp.c | 1 | ||||
-rw-r--r-- | net/netrom/af_netrom.c | 1 | ||||
-rw-r--r-- | net/rose/af_rose.c | 1 | ||||
-rw-r--r-- | net/sctp/protocol.c | 1 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 1 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 1 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 1 | ||||
-rw-r--r-- | net/wanrouter/wanmain.c | 1 | ||||
-rw-r--r-- | net/wireless/reg.c | 9 | ||||
-rw-r--r-- | net/wireless/reg.h | 3 | ||||
-rw-r--r-- | net/wireless/scan.c | 4 | ||||
-rw-r--r-- | net/x25/af_x25.c | 1 | ||||
-rw-r--r-- | net/xfrm/xfrm_hash.h | 2 |
28 files changed, 101 insertions, 42 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index dd43a8289b0d..787ccddb85ea 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -117,9 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt) | |||
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | if (!clnt->trans_mod) | ||
121 | clnt->trans_mod = v9fs_get_default_trans(); | ||
122 | |||
123 | kfree(options); | 120 | kfree(options); |
124 | return ret; | 121 | return ret; |
125 | } | 122 | } |
@@ -689,6 +686,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options) | |||
689 | if (err < 0) | 686 | if (err < 0) |
690 | goto error; | 687 | goto error; |
691 | 688 | ||
689 | if (!clnt->trans_mod) | ||
690 | clnt->trans_mod = v9fs_get_default_trans(); | ||
691 | |||
692 | if (clnt->trans_mod == NULL) { | 692 | if (clnt->trans_mod == NULL) { |
693 | err = -EPROTONOSUPPORT; | 693 | err = -EPROTONOSUPPORT; |
694 | P9_DPRINTK(P9_DEBUG_ERROR, | 694 | P9_DPRINTK(P9_DEBUG_ERROR, |
@@ -1098,7 +1098,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, | |||
1098 | 1098 | ||
1099 | if (data) { | 1099 | if (data) { |
1100 | memmove(data, dataptr, count); | 1100 | memmove(data, dataptr, count); |
1101 | data += count; | ||
1102 | } | 1101 | } |
1103 | 1102 | ||
1104 | if (udata) { | 1103 | if (udata) { |
@@ -1192,9 +1191,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) | |||
1192 | 1191 | ||
1193 | err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret); | 1192 | err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret); |
1194 | if (err) { | 1193 | if (err) { |
1195 | ret = ERR_PTR(err); | ||
1196 | p9pdu_dump(1, req->rc); | 1194 | p9pdu_dump(1, req->rc); |
1197 | goto free_and_error; | 1195 | p9_free_req(clnt, req); |
1196 | goto error; | ||
1198 | } | 1197 | } |
1199 | 1198 | ||
1200 | P9_DPRINTK(P9_DEBUG_9P, | 1199 | P9_DPRINTK(P9_DEBUG_9P, |
@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) | |||
1211 | p9_free_req(clnt, req); | 1210 | p9_free_req(clnt, req); |
1212 | return ret; | 1211 | return ret; |
1213 | 1212 | ||
1214 | free_and_error: | ||
1215 | p9_free_req(clnt, req); | ||
1216 | error: | 1213 | error: |
1217 | kfree(ret); | 1214 | kfree(ret); |
1218 | return ERR_PTR(err); | 1215 | return ERR_PTR(err); |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 590b83963622..875eda5dbad7 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/capability.h> | 54 | #include <linux/capability.h> |
55 | #include <linux/module.h> | 55 | #include <linux/module.h> |
56 | #include <linux/if_arp.h> | 56 | #include <linux/if_arp.h> |
57 | #include <linux/smp_lock.h> | ||
57 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ | 58 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ |
58 | #include <net/datalink.h> | 59 | #include <net/datalink.h> |
59 | #include <net/psnap.h> | 60 | #include <net/psnap.h> |
@@ -1237,6 +1238,7 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr, | |||
1237 | return -ENOBUFS; | 1238 | return -ENOBUFS; |
1238 | 1239 | ||
1239 | *uaddr_len = sizeof(struct sockaddr_at); | 1240 | *uaddr_len = sizeof(struct sockaddr_at); |
1241 | memset(&sat.sat_zero, 0, sizeof(sat.sat_zero)); | ||
1240 | 1242 | ||
1241 | if (peer) { | 1243 | if (peer) { |
1242 | if (sk->sk_state != TCP_ESTABLISHED) | 1244 | if (sk->sk_state != TCP_ESTABLISHED) |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index e50566ebf9f9..94b3388c188b 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -2080,28 +2080,41 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL); | |||
2080 | /* ---- Initialization ---- */ | 2080 | /* ---- Initialization ---- */ |
2081 | static int __init rfcomm_init(void) | 2081 | static int __init rfcomm_init(void) |
2082 | { | 2082 | { |
2083 | int ret; | ||
2084 | |||
2083 | l2cap_load(); | 2085 | l2cap_load(); |
2084 | 2086 | ||
2085 | hci_register_cb(&rfcomm_cb); | 2087 | hci_register_cb(&rfcomm_cb); |
2086 | 2088 | ||
2087 | rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd"); | 2089 | rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd"); |
2088 | if (IS_ERR(rfcomm_thread)) { | 2090 | if (IS_ERR(rfcomm_thread)) { |
2089 | hci_unregister_cb(&rfcomm_cb); | 2091 | ret = PTR_ERR(rfcomm_thread); |
2090 | return PTR_ERR(rfcomm_thread); | 2092 | goto out_thread; |
2091 | } | 2093 | } |
2092 | 2094 | ||
2093 | if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0) | 2095 | if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0) |
2094 | BT_ERR("Failed to create RFCOMM info file"); | 2096 | BT_ERR("Failed to create RFCOMM info file"); |
2095 | 2097 | ||
2096 | rfcomm_init_sockets(); | 2098 | ret = rfcomm_init_ttys(); |
2099 | if (ret) | ||
2100 | goto out_tty; | ||
2097 | 2101 | ||
2098 | #ifdef CONFIG_BT_RFCOMM_TTY | 2102 | ret = rfcomm_init_sockets(); |
2099 | rfcomm_init_ttys(); | 2103 | if (ret) |
2100 | #endif | 2104 | goto out_sock; |
2101 | 2105 | ||
2102 | BT_INFO("RFCOMM ver %s", VERSION); | 2106 | BT_INFO("RFCOMM ver %s", VERSION); |
2103 | 2107 | ||
2104 | return 0; | 2108 | return 0; |
2109 | |||
2110 | out_sock: | ||
2111 | rfcomm_cleanup_ttys(); | ||
2112 | out_tty: | ||
2113 | kthread_stop(rfcomm_thread); | ||
2114 | out_thread: | ||
2115 | hci_unregister_cb(&rfcomm_cb); | ||
2116 | |||
2117 | return ret; | ||
2105 | } | 2118 | } |
2106 | 2119 | ||
2107 | static void __exit rfcomm_exit(void) | 2120 | static void __exit rfcomm_exit(void) |
@@ -2112,9 +2125,7 @@ static void __exit rfcomm_exit(void) | |||
2112 | 2125 | ||
2113 | kthread_stop(rfcomm_thread); | 2126 | kthread_stop(rfcomm_thread); |
2114 | 2127 | ||
2115 | #ifdef CONFIG_BT_RFCOMM_TTY | ||
2116 | rfcomm_cleanup_ttys(); | 2128 | rfcomm_cleanup_ttys(); |
2117 | #endif | ||
2118 | 2129 | ||
2119 | rfcomm_cleanup_sockets(); | 2130 | rfcomm_cleanup_sockets(); |
2120 | } | 2131 | } |
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 7f482784e9f7..0b85e8116859 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -1132,7 +1132,7 @@ error: | |||
1132 | return err; | 1132 | return err; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | void __exit rfcomm_cleanup_sockets(void) | 1135 | void rfcomm_cleanup_sockets(void) |
1136 | { | 1136 | { |
1137 | class_remove_file(bt_class, &class_attr_rfcomm); | 1137 | class_remove_file(bt_class, &class_attr_rfcomm); |
1138 | 1138 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index f4cc44548bda..db3152df7d2b 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -401,6 +401,7 @@ static int raw_getname(struct socket *sock, struct sockaddr *uaddr, | |||
401 | if (peer) | 401 | if (peer) |
402 | return -EOPNOTSUPP; | 402 | return -EOPNOTSUPP; |
403 | 403 | ||
404 | memset(addr, 0, sizeof(*addr)); | ||
404 | addr->can_family = AF_CAN; | 405 | addr->can_family = AF_CAN; |
405 | addr->can_ifindex = ro->ifindex; | 406 | addr->can_ifindex = ro->ifindex; |
406 | 407 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index a0bc087616a4..09fb03fa1ae6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3887,10 +3887,12 @@ int dev_unicast_delete(struct net_device *dev, void *addr) | |||
3887 | 3887 | ||
3888 | ASSERT_RTNL(); | 3888 | ASSERT_RTNL(); |
3889 | 3889 | ||
3890 | netif_addr_lock_bh(dev); | ||
3890 | err = __hw_addr_del(&dev->uc, addr, dev->addr_len, | 3891 | err = __hw_addr_del(&dev->uc, addr, dev->addr_len, |
3891 | NETDEV_HW_ADDR_T_UNICAST); | 3892 | NETDEV_HW_ADDR_T_UNICAST); |
3892 | if (!err) | 3893 | if (!err) |
3893 | __dev_set_rx_mode(dev); | 3894 | __dev_set_rx_mode(dev); |
3895 | netif_addr_unlock_bh(dev); | ||
3894 | return err; | 3896 | return err; |
3895 | } | 3897 | } |
3896 | EXPORT_SYMBOL(dev_unicast_delete); | 3898 | EXPORT_SYMBOL(dev_unicast_delete); |
@@ -3911,10 +3913,12 @@ int dev_unicast_add(struct net_device *dev, void *addr) | |||
3911 | 3913 | ||
3912 | ASSERT_RTNL(); | 3914 | ASSERT_RTNL(); |
3913 | 3915 | ||
3916 | netif_addr_lock_bh(dev); | ||
3914 | err = __hw_addr_add(&dev->uc, addr, dev->addr_len, | 3917 | err = __hw_addr_add(&dev->uc, addr, dev->addr_len, |
3915 | NETDEV_HW_ADDR_T_UNICAST); | 3918 | NETDEV_HW_ADDR_T_UNICAST); |
3916 | if (!err) | 3919 | if (!err) |
3917 | __dev_set_rx_mode(dev); | 3920 | __dev_set_rx_mode(dev); |
3921 | netif_addr_unlock_bh(dev); | ||
3918 | return err; | 3922 | return err; |
3919 | } | 3923 | } |
3920 | EXPORT_SYMBOL(dev_unicast_add); | 3924 | EXPORT_SYMBOL(dev_unicast_add); |
@@ -3973,7 +3977,8 @@ EXPORT_SYMBOL_GPL(__dev_addr_unsync); | |||
3973 | * @from: source device | 3977 | * @from: source device |
3974 | * | 3978 | * |
3975 | * Add newly added addresses to the destination device and release | 3979 | * Add newly added addresses to the destination device and release |
3976 | * addresses that have no users left. | 3980 | * addresses that have no users left. The source device must be |
3981 | * locked by netif_tx_lock_bh. | ||
3977 | * | 3982 | * |
3978 | * This function is intended to be called from the dev->set_rx_mode | 3983 | * This function is intended to be called from the dev->set_rx_mode |
3979 | * function of layered software devices. | 3984 | * function of layered software devices. |
@@ -3982,14 +3987,14 @@ int dev_unicast_sync(struct net_device *to, struct net_device *from) | |||
3982 | { | 3987 | { |
3983 | int err = 0; | 3988 | int err = 0; |
3984 | 3989 | ||
3985 | ASSERT_RTNL(); | ||
3986 | |||
3987 | if (to->addr_len != from->addr_len) | 3990 | if (to->addr_len != from->addr_len) |
3988 | return -EINVAL; | 3991 | return -EINVAL; |
3989 | 3992 | ||
3993 | netif_addr_lock_bh(to); | ||
3990 | err = __hw_addr_sync(&to->uc, &from->uc, to->addr_len); | 3994 | err = __hw_addr_sync(&to->uc, &from->uc, to->addr_len); |
3991 | if (!err) | 3995 | if (!err) |
3992 | __dev_set_rx_mode(to); | 3996 | __dev_set_rx_mode(to); |
3997 | netif_addr_unlock_bh(to); | ||
3993 | return err; | 3998 | return err; |
3994 | } | 3999 | } |
3995 | EXPORT_SYMBOL(dev_unicast_sync); | 4000 | EXPORT_SYMBOL(dev_unicast_sync); |
@@ -4005,27 +4010,27 @@ EXPORT_SYMBOL(dev_unicast_sync); | |||
4005 | */ | 4010 | */ |
4006 | void dev_unicast_unsync(struct net_device *to, struct net_device *from) | 4011 | void dev_unicast_unsync(struct net_device *to, struct net_device *from) |
4007 | { | 4012 | { |
4008 | ASSERT_RTNL(); | ||
4009 | |||
4010 | if (to->addr_len != from->addr_len) | 4013 | if (to->addr_len != from->addr_len) |
4011 | return; | 4014 | return; |
4012 | 4015 | ||
4016 | netif_addr_lock_bh(from); | ||
4017 | netif_addr_lock(to); | ||
4013 | __hw_addr_unsync(&to->uc, &from->uc, to->addr_len); | 4018 | __hw_addr_unsync(&to->uc, &from->uc, to->addr_len); |
4014 | __dev_set_rx_mode(to); | 4019 | __dev_set_rx_mode(to); |
4020 | netif_addr_unlock(to); | ||
4021 | netif_addr_unlock_bh(from); | ||
4015 | } | 4022 | } |
4016 | EXPORT_SYMBOL(dev_unicast_unsync); | 4023 | EXPORT_SYMBOL(dev_unicast_unsync); |
4017 | 4024 | ||
4018 | static void dev_unicast_flush(struct net_device *dev) | 4025 | static void dev_unicast_flush(struct net_device *dev) |
4019 | { | 4026 | { |
4020 | /* rtnl_mutex must be held here */ | 4027 | netif_addr_lock_bh(dev); |
4021 | |||
4022 | __hw_addr_flush(&dev->uc); | 4028 | __hw_addr_flush(&dev->uc); |
4029 | netif_addr_unlock_bh(dev); | ||
4023 | } | 4030 | } |
4024 | 4031 | ||
4025 | static void dev_unicast_init(struct net_device *dev) | 4032 | static void dev_unicast_init(struct net_device *dev) |
4026 | { | 4033 | { |
4027 | /* rtnl_mutex must be held here */ | ||
4028 | |||
4029 | __hw_addr_init(&dev->uc); | 4034 | __hw_addr_init(&dev->uc); |
4030 | } | 4035 | } |
4031 | 4036 | ||
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index ddd2cd2b1775..1c1af2756f38 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -517,7 +517,7 @@ int net_assign_generic(struct net *net, int id, void *data) | |||
517 | */ | 517 | */ |
518 | 518 | ||
519 | ng->len = id; | 519 | ng->len = id; |
520 | memcpy(&ng->ptr, &old_ng->ptr, old_ng->len); | 520 | memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*)); |
521 | 521 | ||
522 | rcu_assign_pointer(net->gen, ng); | 522 | rcu_assign_pointer(net->gen, ng); |
523 | call_rcu(&old_ng->rcu, net_generic_release); | 523 | call_rcu(&old_ng->rcu, net_generic_release); |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 37b3b4293ef4..923db06c7e55 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1066,7 +1066,7 @@ static int __init dccp_init(void) | |||
1066 | (dccp_hashinfo.ehash_size - 1)) | 1066 | (dccp_hashinfo.ehash_size - 1)) |
1067 | dccp_hashinfo.ehash_size--; | 1067 | dccp_hashinfo.ehash_size--; |
1068 | dccp_hashinfo.ehash = (struct inet_ehash_bucket *) | 1068 | dccp_hashinfo.ehash = (struct inet_ehash_bucket *) |
1069 | __get_free_pages(GFP_ATOMIC, ehash_order); | 1069 | __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, ehash_order); |
1070 | } while (!dccp_hashinfo.ehash && --ehash_order > 0); | 1070 | } while (!dccp_hashinfo.ehash && --ehash_order > 0); |
1071 | 1071 | ||
1072 | if (!dccp_hashinfo.ehash) { | 1072 | if (!dccp_hashinfo.ehash) { |
@@ -1091,7 +1091,7 @@ static int __init dccp_init(void) | |||
1091 | bhash_order > 0) | 1091 | bhash_order > 0) |
1092 | continue; | 1092 | continue; |
1093 | dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) | 1093 | dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) |
1094 | __get_free_pages(GFP_ATOMIC, bhash_order); | 1094 | __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, bhash_order); |
1095 | } while (!dccp_hashinfo.bhash && --bhash_order >= 0); | 1095 | } while (!dccp_hashinfo.bhash && --bhash_order >= 0); |
1096 | 1096 | ||
1097 | if (!dccp_hashinfo.bhash) { | 1097 | if (!dccp_hashinfo.bhash) { |
@@ -1159,6 +1159,7 @@ static void __exit dccp_fini(void) | |||
1159 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); | 1159 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); |
1160 | dccp_ackvec_exit(); | 1160 | dccp_ackvec_exit(); |
1161 | dccp_sysctl_exit(); | 1161 | dccp_sysctl_exit(); |
1162 | percpu_counter_destroy(&dccp_orphan_count); | ||
1162 | } | 1163 | } |
1163 | 1164 | ||
1164 | module_init(dccp_init); | 1165 | module_init(dccp_init); |
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index e114da7ca9b8..0e0254fd767d 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -520,6 +520,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr, | |||
520 | if (peer) | 520 | if (peer) |
521 | return -EOPNOTSUPP; | 521 | return -EOPNOTSUPP; |
522 | 522 | ||
523 | memset(sec, 0, sizeof(*sec)); | ||
523 | mutex_lock(&econet_mutex); | 524 | mutex_lock(&econet_mutex); |
524 | 525 | ||
525 | sk = sock->sk; | 526 | sk = sock->sk; |
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index 69c8d9207aa7..d504c349cb0c 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c | |||
@@ -136,7 +136,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, | |||
136 | unsigned int cmd) | 136 | unsigned int cmd) |
137 | { | 137 | { |
138 | struct ifreq ifr; | 138 | struct ifreq ifr; |
139 | int ret = -EINVAL; | 139 | int ret = -ENOIOCTLCMD; |
140 | struct net_device *dev; | 140 | struct net_device *dev; |
141 | 141 | ||
142 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) | 142 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) |
@@ -146,8 +146,10 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, | |||
146 | 146 | ||
147 | dev_load(sock_net(sk), ifr.ifr_name); | 147 | dev_load(sock_net(sk), ifr.ifr_name); |
148 | dev = dev_get_by_name(sock_net(sk), ifr.ifr_name); | 148 | dev = dev_get_by_name(sock_net(sk), ifr.ifr_name); |
149 | if (dev->type == ARPHRD_IEEE802154 || | 149 | |
150 | dev->type == ARPHRD_IEEE802154_PHY) | 150 | if ((dev->type == ARPHRD_IEEE802154 || |
151 | dev->type == ARPHRD_IEEE802154_PHY) && | ||
152 | dev->netdev_ops->ndo_do_ioctl) | ||
151 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); | 153 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); |
152 | 154 | ||
153 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) | 155 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) |
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 53dd912d52b4..d1da6c619c7d 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c | |||
@@ -377,6 +377,18 @@ int ieee802154_dgram_deliver(struct net_device *dev, struct sk_buff *skb) | |||
377 | return ret; | 377 | return ret; |
378 | } | 378 | } |
379 | 379 | ||
380 | static int dgram_getsockopt(struct sock *sk, int level, int optname, | ||
381 | char __user *optval, int __user *optlen) | ||
382 | { | ||
383 | return -EOPNOTSUPP; | ||
384 | } | ||
385 | |||
386 | static int dgram_setsockopt(struct sock *sk, int level, int optname, | ||
387 | char __user *optval, int __user optlen) | ||
388 | { | ||
389 | return -EOPNOTSUPP; | ||
390 | } | ||
391 | |||
380 | struct proto ieee802154_dgram_prot = { | 392 | struct proto ieee802154_dgram_prot = { |
381 | .name = "IEEE-802.15.4-MAC", | 393 | .name = "IEEE-802.15.4-MAC", |
382 | .owner = THIS_MODULE, | 394 | .owner = THIS_MODULE, |
@@ -391,5 +403,7 @@ struct proto ieee802154_dgram_prot = { | |||
391 | .connect = dgram_connect, | 403 | .connect = dgram_connect, |
392 | .disconnect = dgram_disconnect, | 404 | .disconnect = dgram_disconnect, |
393 | .ioctl = dgram_ioctl, | 405 | .ioctl = dgram_ioctl, |
406 | .getsockopt = dgram_getsockopt, | ||
407 | .setsockopt = dgram_setsockopt, | ||
394 | }; | 408 | }; |
395 | 409 | ||
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index ea8d1f15206e..60dee69a1d04 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c | |||
@@ -238,6 +238,18 @@ void ieee802154_raw_deliver(struct net_device *dev, struct sk_buff *skb) | |||
238 | read_unlock(&raw_lock); | 238 | read_unlock(&raw_lock); |
239 | } | 239 | } |
240 | 240 | ||
241 | static int raw_getsockopt(struct sock *sk, int level, int optname, | ||
242 | char __user *optval, int __user *optlen) | ||
243 | { | ||
244 | return -EOPNOTSUPP; | ||
245 | } | ||
246 | |||
247 | static int raw_setsockopt(struct sock *sk, int level, int optname, | ||
248 | char __user *optval, int __user optlen) | ||
249 | { | ||
250 | return -EOPNOTSUPP; | ||
251 | } | ||
252 | |||
241 | struct proto ieee802154_raw_prot = { | 253 | struct proto ieee802154_raw_prot = { |
242 | .name = "IEEE-802.15.4-RAW", | 254 | .name = "IEEE-802.15.4-RAW", |
243 | .owner = THIS_MODULE, | 255 | .owner = THIS_MODULE, |
@@ -250,5 +262,7 @@ struct proto ieee802154_raw_prot = { | |||
250 | .unhash = raw_unhash, | 262 | .unhash = raw_unhash, |
251 | .connect = raw_connect, | 263 | .connect = raw_connect, |
252 | .disconnect = raw_disconnect, | 264 | .disconnect = raw_disconnect, |
265 | .getsockopt = raw_getsockopt, | ||
266 | .setsockopt = raw_setsockopt, | ||
253 | }; | 267 | }; |
254 | 268 | ||
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 417b0e309495..f1118d92a191 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/netdevice.h> | 41 | #include <linux/netdevice.h> |
42 | #include <linux/uio.h> | 42 | #include <linux/uio.h> |
43 | #include <linux/skbuff.h> | 43 | #include <linux/skbuff.h> |
44 | #include <linux/smp_lock.h> | ||
44 | #include <linux/socket.h> | 45 | #include <linux/socket.h> |
45 | #include <linux/sockios.h> | 46 | #include <linux/sockios.h> |
46 | #include <linux/string.h> | 47 | #include <linux/string.h> |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index cb762c8723ea..50b43c57d5d8 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/capability.h> | 45 | #include <linux/capability.h> |
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
48 | #include <linux/smp_lock.h> | ||
48 | #include <linux/socket.h> | 49 | #include <linux/socket.h> |
49 | #include <linux/sockios.h> | 50 | #include <linux/sockios.h> |
50 | #include <linux/init.h> | 51 | #include <linux/init.h> |
@@ -714,6 +715,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr, | |||
714 | struct sock *sk = sock->sk; | 715 | struct sock *sk = sock->sk; |
715 | struct irda_sock *self = irda_sk(sk); | 716 | struct irda_sock *self = irda_sk(sk); |
716 | 717 | ||
718 | memset(&saddr, 0, sizeof(saddr)); | ||
717 | if (peer) { | 719 | if (peer) { |
718 | if (sk->sk_state != TCP_ESTABLISHED) | 720 | if (sk->sk_state != TCP_ESTABLISHED) |
719 | return -ENOTCONN; | 721 | return -ENOTCONN; |
diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h index bccf4d0059f0..b001c361ad30 100644 --- a/net/irda/irnet/irnet.h +++ b/net/irda/irnet/irnet.h | |||
@@ -241,7 +241,6 @@ | |||
241 | #include <linux/module.h> | 241 | #include <linux/module.h> |
242 | 242 | ||
243 | #include <linux/kernel.h> | 243 | #include <linux/kernel.h> |
244 | #include <linux/smp_lock.h> | ||
245 | #include <linux/skbuff.h> | 244 | #include <linux/skbuff.h> |
246 | #include <linux/tty.h> | 245 | #include <linux/tty.h> |
247 | #include <linux/proc_fs.h> | 246 | #include <linux/proc_fs.h> |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 6d8ae03c14f5..68cbcb19cbd8 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * 2) as a control channel (write commands, read events) | 13 | * 2) as a control channel (write commands, read events) |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/smp_lock.h> | ||
16 | #include "irnet_ppp.h" /* Private header */ | 17 | #include "irnet_ppp.h" /* Private header */ |
17 | /* Please put other headers in irnet.h - Thanks */ | 18 | /* Please put other headers in irnet.h - Thanks */ |
18 | 19 | ||
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index ce51ce012cda..ce1a34b99c23 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -847,6 +847,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr, | |||
847 | sax->fsa_ax25.sax25_family = AF_NETROM; | 847 | sax->fsa_ax25.sax25_family = AF_NETROM; |
848 | sax->fsa_ax25.sax25_ndigis = 1; | 848 | sax->fsa_ax25.sax25_ndigis = 1; |
849 | sax->fsa_ax25.sax25_call = nr->user_addr; | 849 | sax->fsa_ax25.sax25_call = nr->user_addr; |
850 | memset(sax->fsa_digipeater, 0, sizeof(sax->fsa_digipeater)); | ||
850 | sax->fsa_digipeater[0] = nr->dest_addr; | 851 | sax->fsa_digipeater[0] = nr->dest_addr; |
851 | *uaddr_len = sizeof(struct full_sockaddr_ax25); | 852 | *uaddr_len = sizeof(struct full_sockaddr_ax25); |
852 | } else { | 853 | } else { |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index f0a76f6bca71..e5f478ca3d61 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -954,6 +954,7 @@ static int rose_getname(struct socket *sock, struct sockaddr *uaddr, | |||
954 | struct rose_sock *rose = rose_sk(sk); | 954 | struct rose_sock *rose = rose_sk(sk); |
955 | int n; | 955 | int n; |
956 | 956 | ||
957 | memset(srose, 0, sizeof(*srose)); | ||
957 | if (peer != 0) { | 958 | if (peer != 0) { |
958 | if (sk->sk_state != TCP_ESTABLISHED) | 959 | if (sk->sk_state != TCP_ESTABLISHED) |
959 | return -ENOTCONN; | 960 | return -ENOTCONN; |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 79cbd47f4df7..a76da657244a 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -160,6 +160,7 @@ static void sctp_proc_exit(void) | |||
160 | remove_proc_entry("sctp", init_net.proc_net); | 160 | remove_proc_entry("sctp", init_net.proc_net); |
161 | } | 161 | } |
162 | #endif | 162 | #endif |
163 | percpu_counter_destroy(&sctp_sockets_allocated); | ||
163 | } | 164 | } |
164 | 165 | ||
165 | /* Private helper to extract ipv4 address and stash them in | 166 | /* Private helper to extract ipv4 address and stash them in |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5bc2f45bddf0..ebfcf9b89909 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/kallsyms.h> | 28 | #include <linux/kallsyms.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/smp_lock.h> | ||
32 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
33 | #include <linux/workqueue.h> | 32 | #include <linux/workqueue.h> |
34 | #include <linux/in6.h> | 33 | #include <linux/in6.h> |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 1102ce1251f7..8f459abe97cf 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/mempool.h> | 17 | #include <linux/mempool.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/smp_lock.h> | ||
20 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
21 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
22 | 21 | ||
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 6f33d33cc064..27d44332f017 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/smp_lock.h> | ||
8 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
9 | #include <linux/freezer.h> | 10 | #include <linux/freezer.h> |
10 | #include <linux/kthread.h> | 11 | #include <linux/kthread.h> |
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 466e2d22d256..258daa80ad92 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/module.h> /* support for loadable modules */ | 49 | #include <linux/module.h> /* support for loadable modules */ |
50 | #include <linux/slab.h> /* kmalloc(), kfree() */ | 50 | #include <linux/slab.h> /* kmalloc(), kfree() */ |
51 | #include <linux/smp_lock.h> | ||
51 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
52 | #include <linux/string.h> /* inline mem*, str* functions */ | 53 | #include <linux/string.h> /* inline mem*, str* functions */ |
53 | 54 | ||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index b3ac0aace0e5..0f61ae613f3b 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1095,17 +1095,18 @@ static void handle_reg_beacon(struct wiphy *wiphy, | |||
1095 | 1095 | ||
1096 | chan->beacon_found = true; | 1096 | chan->beacon_found = true; |
1097 | 1097 | ||
1098 | if (wiphy->disable_beacon_hints) | ||
1099 | return; | ||
1100 | |||
1098 | chan_before.center_freq = chan->center_freq; | 1101 | chan_before.center_freq = chan->center_freq; |
1099 | chan_before.flags = chan->flags; | 1102 | chan_before.flags = chan->flags; |
1100 | 1103 | ||
1101 | if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) && | 1104 | if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) { |
1102 | !(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) { | ||
1103 | chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 1105 | chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; |
1104 | channel_changed = true; | 1106 | channel_changed = true; |
1105 | } | 1107 | } |
1106 | 1108 | ||
1107 | if ((chan->flags & IEEE80211_CHAN_NO_IBSS) && | 1109 | if (chan->flags & IEEE80211_CHAN_NO_IBSS) { |
1108 | !(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) { | ||
1109 | chan->flags &= ~IEEE80211_CHAN_NO_IBSS; | 1110 | chan->flags &= ~IEEE80211_CHAN_NO_IBSS; |
1110 | channel_changed = true; | 1111 | channel_changed = true; |
1111 | } | 1112 | } |
diff --git a/net/wireless/reg.h b/net/wireless/reg.h index 662a9dad76d5..3362c7c069b2 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h | |||
@@ -30,7 +30,8 @@ int set_regdom(const struct ieee80211_regdomain *rd); | |||
30 | * non-radar 5 GHz channels. | 30 | * non-radar 5 GHz channels. |
31 | * | 31 | * |
32 | * Drivers do not need to call this, cfg80211 will do it for after a scan | 32 | * Drivers do not need to call this, cfg80211 will do it for after a scan |
33 | * on a newly found BSS. | 33 | * on a newly found BSS. If you cannot make use of this feature you can |
34 | * set the wiphy->disable_beacon_hints to true. | ||
34 | */ | 35 | */ |
35 | int regulatory_hint_found_beacon(struct wiphy *wiphy, | 36 | int regulatory_hint_found_beacon(struct wiphy *wiphy, |
36 | struct ieee80211_channel *beacon_chan, | 37 | struct ieee80211_channel *beacon_chan, |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 67714d7ed5b4..0ccf3a07dc02 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -141,7 +141,7 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2) | |||
141 | 141 | ||
142 | if (!ie1 && !ie2) | 142 | if (!ie1 && !ie2) |
143 | return 0; | 143 | return 0; |
144 | if (!ie1) | 144 | if (!ie1 || !ie2) |
145 | return -1; | 145 | return -1; |
146 | 146 | ||
147 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); | 147 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); |
@@ -194,6 +194,8 @@ static bool is_mesh(struct cfg80211_bss *a, | |||
194 | ie = find_ie(WLAN_EID_MESH_CONFIG, | 194 | ie = find_ie(WLAN_EID_MESH_CONFIG, |
195 | a->information_elements, | 195 | a->information_elements, |
196 | a->len_information_elements); | 196 | a->len_information_elements); |
197 | if (!ie) | ||
198 | return false; | ||
197 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) | 199 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) |
198 | return false; | 200 | return false; |
199 | 201 | ||
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 21cdc872004e..5e6c072c64d3 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/smp_lock.h> | ||
43 | #include <linux/timer.h> | 44 | #include <linux/timer.h> |
44 | #include <linux/string.h> | 45 | #include <linux/string.h> |
45 | #include <linux/net.h> | 46 | #include <linux/net.h> |
diff --git a/net/xfrm/xfrm_hash.h b/net/xfrm/xfrm_hash.h index d401dc8f05ed..e5195c99f71e 100644 --- a/net/xfrm/xfrm_hash.h +++ b/net/xfrm/xfrm_hash.h | |||
@@ -16,7 +16,7 @@ static inline unsigned int __xfrm6_addr_hash(xfrm_address_t *addr) | |||
16 | 16 | ||
17 | static inline unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) | 17 | static inline unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) |
18 | { | 18 | { |
19 | return ntohl(daddr->a4 ^ saddr->a4); | 19 | return ntohl(daddr->a4 + saddr->a4); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline unsigned int __xfrm6_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) | 22 | static inline unsigned int __xfrm6_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) |