diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 23 | ||||
-rw-r--r-- | net/dccp/probe.c | 2 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_wx.c | 7 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_rate.c | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 3 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 16 | ||||
-rw-r--r-- | net/tipc/name_table.c | 3 |
10 files changed, 35 insertions, 30 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 1d55fbd22dfa..239a08a6ff24 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -171,6 +171,19 @@ static const char *af_family_slock_key_strings[AF_MAX+1] = { | |||
171 | "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" , | 171 | "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" , |
172 | "slock-AF_RXRPC" , "slock-AF_MAX" | 172 | "slock-AF_RXRPC" , "slock-AF_MAX" |
173 | }; | 173 | }; |
174 | static const char *af_family_clock_key_strings[AF_MAX+1] = { | ||
175 | "clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" , | ||
176 | "clock-AF_AX25" , "clock-AF_IPX" , "clock-AF_APPLETALK", | ||
177 | "clock-AF_NETROM", "clock-AF_BRIDGE" , "clock-AF_ATMPVC" , | ||
178 | "clock-AF_X25" , "clock-AF_INET6" , "clock-AF_ROSE" , | ||
179 | "clock-AF_DECnet", "clock-AF_NETBEUI" , "clock-AF_SECURITY" , | ||
180 | "clock-AF_KEY" , "clock-AF_NETLINK" , "clock-AF_PACKET" , | ||
181 | "clock-AF_ASH" , "clock-AF_ECONET" , "clock-AF_ATMSVC" , | ||
182 | "clock-21" , "clock-AF_SNA" , "clock-AF_IRDA" , | ||
183 | "clock-AF_PPPOX" , "clock-AF_WANPIPE" , "clock-AF_LLC" , | ||
184 | "clock-27" , "clock-28" , "clock-29" , | ||
185 | "clock-AF_TIPC" , "clock-AF_BLUETOOTH", "clock-AF_MAX" | ||
186 | }; | ||
174 | #endif | 187 | #endif |
175 | 188 | ||
176 | /* | 189 | /* |
@@ -941,8 +954,9 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority) | |||
941 | 954 | ||
942 | rwlock_init(&newsk->sk_dst_lock); | 955 | rwlock_init(&newsk->sk_dst_lock); |
943 | rwlock_init(&newsk->sk_callback_lock); | 956 | rwlock_init(&newsk->sk_callback_lock); |
944 | lockdep_set_class(&newsk->sk_callback_lock, | 957 | lockdep_set_class_and_name(&newsk->sk_callback_lock, |
945 | af_callback_keys + newsk->sk_family); | 958 | af_callback_keys + newsk->sk_family, |
959 | af_family_clock_key_strings[newsk->sk_family]); | ||
946 | 960 | ||
947 | newsk->sk_dst_cache = NULL; | 961 | newsk->sk_dst_cache = NULL; |
948 | newsk->sk_wmem_queued = 0; | 962 | newsk->sk_wmem_queued = 0; |
@@ -1530,8 +1544,9 @@ void sock_init_data(struct socket *sock, struct sock *sk) | |||
1530 | 1544 | ||
1531 | rwlock_init(&sk->sk_dst_lock); | 1545 | rwlock_init(&sk->sk_dst_lock); |
1532 | rwlock_init(&sk->sk_callback_lock); | 1546 | rwlock_init(&sk->sk_callback_lock); |
1533 | lockdep_set_class(&sk->sk_callback_lock, | 1547 | lockdep_set_class_and_name(&sk->sk_callback_lock, |
1534 | af_callback_keys + sk->sk_family); | 1548 | af_callback_keys + sk->sk_family, |
1549 | af_family_clock_key_strings[sk->sk_family]); | ||
1535 | 1550 | ||
1536 | sk->sk_state_change = sock_def_wakeup; | 1551 | sk->sk_state_change = sock_def_wakeup; |
1537 | sk->sk_data_ready = sock_def_readable; | 1552 | sk->sk_data_ready = sock_def_readable; |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 43a3adb027e7..bae10b0f2fc3 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -112,7 +112,7 @@ static struct jprobe dccp_send_probe = { | |||
112 | .kp = { | 112 | .kp = { |
113 | .symbol_name = "dccp_sendmsg", | 113 | .symbol_name = "dccp_sendmsg", |
114 | }, | 114 | }, |
115 | .entry = JPROBE_ENTRY(jdccp_sendmsg), | 115 | .entry = jdccp_sendmsg, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static int dccpprobe_open(struct inode *inode, struct file *file) | 118 | static int dccpprobe_open(struct inode *inode, struct file *file) |
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index 523a137d49dd..465b73d50532 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c | |||
@@ -90,14 +90,11 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | /* Add channel and frequency */ | 92 | /* Add channel and frequency */ |
93 | /* Note : userspace automatically computes channel using iwrange */ | ||
93 | iwe.cmd = SIOCGIWFREQ; | 94 | iwe.cmd = SIOCGIWFREQ; |
94 | iwe.u.freq.m = network->channel; | ||
95 | iwe.u.freq.e = 0; | ||
96 | iwe.u.freq.i = 0; | ||
97 | start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN); | ||
98 | |||
99 | iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network->channel); | 95 | iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network->channel); |
100 | iwe.u.freq.e = 6; | 96 | iwe.u.freq.e = 6; |
97 | iwe.u.freq.i = 0; | ||
101 | start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN); | 98 | start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN); |
102 | 99 | ||
103 | /* Add encryption capability */ | 100 | /* Add encryption capability */ |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 3da9d73d1b52..27c7918e442a 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -177,7 +177,7 @@ static int ct_open(struct inode *inode, struct file *file) | |||
177 | struct ct_iter_state *st; | 177 | struct ct_iter_state *st; |
178 | int ret; | 178 | int ret; |
179 | 179 | ||
180 | st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL); | 180 | st = kzalloc(sizeof(struct ct_iter_state), GFP_KERNEL); |
181 | if (st == NULL) | 181 | if (st == NULL) |
182 | return -ENOMEM; | 182 | return -ENOMEM; |
183 | ret = seq_open(file, &ct_seq_ops); | 183 | ret = seq_open(file, &ct_seq_ops); |
@@ -185,7 +185,6 @@ static int ct_open(struct inode *inode, struct file *file) | |||
185 | goto out_free; | 185 | goto out_free; |
186 | seq = file->private_data; | 186 | seq = file->private_data; |
187 | seq->private = st; | 187 | seq->private = st; |
188 | memset(st, 0, sizeof(struct ct_iter_state)); | ||
189 | return ret; | 188 | return ret; |
190 | out_free: | 189 | out_free: |
191 | kfree(st); | 190 | kfree(st); |
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index f37d5928921a..b76398d1b454 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -130,7 +130,7 @@ static struct jprobe tcp_jprobe = { | |||
130 | .kp = { | 130 | .kp = { |
131 | .symbol_name = "tcp_rcv_established", | 131 | .symbol_name = "tcp_rcv_established", |
132 | }, | 132 | }, |
133 | .entry = JPROBE_ENTRY(jtcp_rcv_established), | 133 | .entry = jtcp_rcv_established, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static int tcpprobe_open(struct inode * inode, struct file * file) | 136 | static int tcpprobe_open(struct inode * inode, struct file * file) |
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c index 16e850864b8a..2118de04fc35 100644 --- a/net/mac80211/ieee80211_rate.c +++ b/net/mac80211/ieee80211_rate.c | |||
@@ -24,11 +24,10 @@ int ieee80211_rate_control_register(struct rate_control_ops *ops) | |||
24 | { | 24 | { |
25 | struct rate_control_alg *alg; | 25 | struct rate_control_alg *alg; |
26 | 26 | ||
27 | alg = kmalloc(sizeof(*alg), GFP_KERNEL); | 27 | alg = kzalloc(sizeof(*alg), GFP_KERNEL); |
28 | if (alg == NULL) { | 28 | if (alg == NULL) { |
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | } | 30 | } |
31 | memset(alg, 0, sizeof(*alg)); | ||
32 | alg->ops = ops; | 31 | alg->ops = ops; |
33 | 32 | ||
34 | mutex_lock(&rate_ctrl_mutex); | 33 | mutex_lock(&rate_ctrl_mutex); |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 952d8dd0676c..7ba352e3ffe0 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1326,10 +1326,9 @@ ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid) | |||
1326 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 1326 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
1327 | struct ieee80211_sta_bss *bss; | 1327 | struct ieee80211_sta_bss *bss; |
1328 | 1328 | ||
1329 | bss = kmalloc(sizeof(*bss), GFP_ATOMIC); | 1329 | bss = kzalloc(sizeof(*bss), GFP_ATOMIC); |
1330 | if (!bss) | 1330 | if (!bss) |
1331 | return NULL; | 1331 | return NULL; |
1332 | memset(bss, 0, sizeof(*bss)); | ||
1333 | atomic_inc(&bss->users); | 1332 | atomic_inc(&bss->users); |
1334 | atomic_inc(&bss->users); | 1333 | atomic_inc(&bss->users); |
1335 | memcpy(bss->bssid, bssid, ETH_ALEN); | 1334 | memcpy(bss->bssid, bssid, ETH_ALEN); |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index f752293940f9..a4ce5e887997 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -198,7 +198,7 @@ static int ct_open(struct inode *inode, struct file *file) | |||
198 | struct ct_iter_state *st; | 198 | struct ct_iter_state *st; |
199 | int ret; | 199 | int ret; |
200 | 200 | ||
201 | st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL); | 201 | st = kzalloc(sizeof(struct ct_iter_state), GFP_KERNEL); |
202 | if (st == NULL) | 202 | if (st == NULL) |
203 | return -ENOMEM; | 203 | return -ENOMEM; |
204 | ret = seq_open(file, &ct_seq_ops); | 204 | ret = seq_open(file, &ct_seq_ops); |
@@ -206,7 +206,6 @@ static int ct_open(struct inode *inode, struct file *file) | |||
206 | goto out_free; | 206 | goto out_free; |
207 | seq = file->private_data; | 207 | seq = file->private_data; |
208 | seq->private = st; | 208 | seq->private = st; |
209 | memset(st, 0, sizeof(struct ct_iter_state)); | ||
210 | return ret; | 209 | return ret; |
211 | out_free: | 210 | out_free: |
212 | kfree(st); | 211 | kfree(st); |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index e787b6a43eee..5b2b6fb244f2 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -460,21 +460,19 @@ static struct dentry_operations rpc_dentry_operations = { | |||
460 | static int | 460 | static int |
461 | rpc_lookup_parent(char *path, struct nameidata *nd) | 461 | rpc_lookup_parent(char *path, struct nameidata *nd) |
462 | { | 462 | { |
463 | struct vfsmount *mnt; | ||
464 | |||
463 | if (path[0] == '\0') | 465 | if (path[0] == '\0') |
464 | return -ENOENT; | 466 | return -ENOENT; |
465 | nd->mnt = rpc_get_mount(); | 467 | |
466 | if (IS_ERR(nd->mnt)) { | 468 | mnt = rpc_get_mount(); |
469 | if (IS_ERR(mnt)) { | ||
467 | printk(KERN_WARNING "%s: %s failed to mount " | 470 | printk(KERN_WARNING "%s: %s failed to mount " |
468 | "pseudofilesystem \n", __FILE__, __FUNCTION__); | 471 | "pseudofilesystem \n", __FILE__, __FUNCTION__); |
469 | return PTR_ERR(nd->mnt); | 472 | return PTR_ERR(mnt); |
470 | } | 473 | } |
471 | mntget(nd->mnt); | ||
472 | nd->dentry = dget(rpc_mount->mnt_root); | ||
473 | nd->last_type = LAST_ROOT; | ||
474 | nd->flags = LOOKUP_PARENT; | ||
475 | nd->depth = 0; | ||
476 | 474 | ||
477 | if (path_walk(path, nd)) { | 475 | if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) { |
478 | printk(KERN_WARNING "%s: %s failed to find path %s\n", | 476 | printk(KERN_WARNING "%s: %s failed to find path %s\n", |
479 | __FILE__, __FUNCTION__, path); | 477 | __FILE__, __FUNCTION__, path); |
480 | rpc_put_mount(); | 478 | rpc_put_mount(); |
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 9dfc9127acdd..d8473eefcd23 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -1052,12 +1052,11 @@ int tipc_nametbl_init(void) | |||
1052 | { | 1052 | { |
1053 | int array_size = sizeof(struct hlist_head) * tipc_nametbl_size; | 1053 | int array_size = sizeof(struct hlist_head) * tipc_nametbl_size; |
1054 | 1054 | ||
1055 | table.types = kmalloc(array_size, GFP_ATOMIC); | 1055 | table.types = kzalloc(array_size, GFP_ATOMIC); |
1056 | if (!table.types) | 1056 | if (!table.types) |
1057 | return -ENOMEM; | 1057 | return -ENOMEM; |
1058 | 1058 | ||
1059 | write_lock_bh(&tipc_nametbl_lock); | 1059 | write_lock_bh(&tipc_nametbl_lock); |
1060 | memset(table.types, 0, array_size); | ||
1061 | table.local_publ_count = 0; | 1060 | table.local_publ_count = 0; |
1062 | write_unlock_bh(&tipc_nametbl_lock); | 1061 | write_unlock_bh(&tipc_nametbl_lock); |
1063 | return 0; | 1062 | return 0; |