diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-29 11:29:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-29 11:29:55 -0500 |
commit | 219ff3ad611ecfe8a2fd29b8c50a5313c9d15383 (patch) | |
tree | 69a9ad12ed64d0966ec63bb5c4699e3effb5490f /net | |
parent | 547598d3a91f11b1f802bf0b122f777c3c22f26d (diff) | |
parent | 2335f8ec27e125208d8d2d3e257a82862c4977d6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (79 commits)
[X25]: Use proc_create() to setup ->proc_fops first
[WANROUTER]: Use proc_create() to setup ->proc_fops first
[8021Q]: Use proc_create() to setup ->proc_fops first
[IPV4]: Use proc_create() to setup ->proc_fops first
[IPV6]: Use proc_create() to setup ->proc_fops first
[SCTP]: Use proc_create() to setup ->proc_fops first
[PKTGEN]: Use proc_create() to setup ->proc_fops first
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
[LLC]: Use proc_create() to setup ->proc_fops first
[IPX]: Use proc_create() to setup ->proc_fops first
[SUNRPC]: Use proc_create() to setup ->proc_fops first
[ATM]: Use proc_create() to setup ->proc_fops first
[SCTP]: Update AUTH structures to match declarations in draft-16.
[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
[SCTP]: Clean up naming conventions of sctp protocol/address family registration
[APPLETALK]: Use proc_create() to setup ->proc_fops first
[BNX2X]: add bnx2x to MAINTAINERS
[BNX2X]: update version, remove CVS strings
[BNX2X]: Fix Xmit bugs
[BNX2X]: Prevent PCI queue overflow
...
Diffstat (limited to 'net')
43 files changed, 158 insertions, 140 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index a0ec47925597..146cfb0e9882 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -161,11 +161,10 @@ int __init vlan_proc_init(void) | |||
161 | if (!proc_vlan_dir) | 161 | if (!proc_vlan_dir) |
162 | goto err; | 162 | goto err; |
163 | 163 | ||
164 | proc_vlan_conf = create_proc_entry(name_conf, S_IFREG|S_IRUSR|S_IWUSR, | 164 | proc_vlan_conf = proc_create(name_conf, S_IFREG|S_IRUSR|S_IWUSR, |
165 | proc_vlan_dir); | 165 | proc_vlan_dir, &vlan_fops); |
166 | if (!proc_vlan_conf) | 166 | if (!proc_vlan_conf) |
167 | goto err; | 167 | goto err; |
168 | proc_vlan_conf->proc_fops = &vlan_fops; | ||
169 | return 0; | 168 | return 0; |
170 | 169 | ||
171 | err: | 170 | err: |
@@ -182,13 +181,11 @@ int vlan_proc_add_dev(struct net_device *vlandev) | |||
182 | { | 181 | { |
183 | struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); | 182 | struct vlan_dev_info *dev_info = vlan_dev_info(vlandev); |
184 | 183 | ||
185 | dev_info->dent = create_proc_entry(vlandev->name, | 184 | dev_info->dent = proc_create(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR, |
186 | S_IFREG|S_IRUSR|S_IWUSR, | 185 | proc_vlan_dir, &vlandev_fops); |
187 | proc_vlan_dir); | ||
188 | if (!dev_info->dent) | 186 | if (!dev_info->dent) |
189 | return -ENOBUFS; | 187 | return -ENOBUFS; |
190 | 188 | ||
191 | dev_info->dent->proc_fops = &vlandev_fops; | ||
192 | dev_info->dent->data = vlandev; | 189 | dev_info->dent->data = vlandev; |
193 | return 0; | 190 | return 0; |
194 | } | 191 | } |
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index 8e8dcfd532db..162199a2d74f 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c | |||
@@ -283,25 +283,24 @@ int __init atalk_proc_init(void) | |||
283 | goto out; | 283 | goto out; |
284 | atalk_proc_dir->owner = THIS_MODULE; | 284 | atalk_proc_dir->owner = THIS_MODULE; |
285 | 285 | ||
286 | p = create_proc_entry("interface", S_IRUGO, atalk_proc_dir); | 286 | p = proc_create("interface", S_IRUGO, atalk_proc_dir, |
287 | &atalk_seq_interface_fops); | ||
287 | if (!p) | 288 | if (!p) |
288 | goto out_interface; | 289 | goto out_interface; |
289 | p->proc_fops = &atalk_seq_interface_fops; | ||
290 | 290 | ||
291 | p = create_proc_entry("route", S_IRUGO, atalk_proc_dir); | 291 | p = proc_create("route", S_IRUGO, atalk_proc_dir, |
292 | &atalk_seq_route_fops); | ||
292 | if (!p) | 293 | if (!p) |
293 | goto out_route; | 294 | goto out_route; |
294 | p->proc_fops = &atalk_seq_route_fops; | ||
295 | 295 | ||
296 | p = create_proc_entry("socket", S_IRUGO, atalk_proc_dir); | 296 | p = proc_create("socket", S_IRUGO, atalk_proc_dir, |
297 | &atalk_seq_socket_fops); | ||
297 | if (!p) | 298 | if (!p) |
298 | goto out_socket; | 299 | goto out_socket; |
299 | p->proc_fops = &atalk_seq_socket_fops; | ||
300 | 300 | ||
301 | p = create_proc_entry("arp", S_IRUGO, atalk_proc_dir); | 301 | p = proc_create("arp", S_IRUGO, atalk_proc_dir, &atalk_seq_arp_fops); |
302 | if (!p) | 302 | if (!p) |
303 | goto out_arp; | 303 | goto out_arp; |
304 | p->proc_fops = &atalk_seq_arp_fops; | ||
305 | 304 | ||
306 | rc = 0; | 305 | rc = 0; |
307 | out: | 306 | out: |
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 574d9a964176..1b228065e745 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -742,9 +742,9 @@ static int __init br2684_init(void) | |||
742 | { | 742 | { |
743 | #ifdef CONFIG_PROC_FS | 743 | #ifdef CONFIG_PROC_FS |
744 | struct proc_dir_entry *p; | 744 | struct proc_dir_entry *p; |
745 | if ((p = create_proc_entry("br2684", 0, atm_proc_root)) == NULL) | 745 | p = proc_create("br2684", 0, atm_proc_root, &br2684_proc_ops); |
746 | if (p == NULL) | ||
746 | return -ENOMEM; | 747 | return -ENOMEM; |
747 | p->proc_fops = &br2684_proc_ops; | ||
748 | #endif | 748 | #endif |
749 | register_atm_ioctl(&br2684_ioctl_ops); | 749 | register_atm_ioctl(&br2684_ioctl_ops); |
750 | return 0; | 750 | return 0; |
diff --git a/net/atm/clip.c b/net/atm/clip.c index 86b885ec1cbd..d30167c0b48e 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -962,9 +962,7 @@ static int __init atm_clip_init(void) | |||
962 | { | 962 | { |
963 | struct proc_dir_entry *p; | 963 | struct proc_dir_entry *p; |
964 | 964 | ||
965 | p = create_proc_entry("arp", S_IRUGO, atm_proc_root); | 965 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); |
966 | if (p) | ||
967 | p->proc_fops = &arp_seq_fops; | ||
968 | } | 966 | } |
969 | #endif | 967 | #endif |
970 | 968 | ||
diff --git a/net/atm/lec.c b/net/atm/lec.c index 1a8c4c6c0cd0..0e450d12f035 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -1249,9 +1249,7 @@ static int __init lane_module_init(void) | |||
1249 | #ifdef CONFIG_PROC_FS | 1249 | #ifdef CONFIG_PROC_FS |
1250 | struct proc_dir_entry *p; | 1250 | struct proc_dir_entry *p; |
1251 | 1251 | ||
1252 | p = create_proc_entry("lec", S_IRUGO, atm_proc_root); | 1252 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); |
1253 | if (p) | ||
1254 | p->proc_fops = &lec_seq_fops; | ||
1255 | #endif | 1253 | #endif |
1256 | 1254 | ||
1257 | register_atm_ioctl(&lane_ioctl_ops); | 1255 | register_atm_ioctl(&lane_ioctl_ops); |
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c index 91f3ffc90dbd..4990541ef5da 100644 --- a/net/atm/mpoa_proc.c +++ b/net/atm/mpoa_proc.c | |||
@@ -276,12 +276,11 @@ int mpc_proc_init(void) | |||
276 | { | 276 | { |
277 | struct proc_dir_entry *p; | 277 | struct proc_dir_entry *p; |
278 | 278 | ||
279 | p = create_proc_entry(STAT_FILE_NAME, 0, atm_proc_root); | 279 | p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_file_operations); |
280 | if (!p) { | 280 | if (!p) { |
281 | printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME); | 281 | printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME); |
282 | return -ENOMEM; | 282 | return -ENOMEM; |
283 | } | 283 | } |
284 | p->proc_fops = &mpc_file_operations; | ||
285 | p->owner = THIS_MODULE; | 284 | p->owner = THIS_MODULE; |
286 | return 0; | 285 | return 0; |
287 | } | 286 | } |
diff --git a/net/atm/proc.c b/net/atm/proc.c index 49125110bb8b..e9693aed7ef8 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -435,11 +435,11 @@ int atm_proc_dev_register(struct atm_dev *dev) | |||
435 | goto err_out; | 435 | goto err_out; |
436 | sprintf(dev->proc_name,"%s:%d",dev->type, dev->number); | 436 | sprintf(dev->proc_name,"%s:%d",dev->type, dev->number); |
437 | 437 | ||
438 | dev->proc_entry = create_proc_entry(dev->proc_name, 0, atm_proc_root); | 438 | dev->proc_entry = proc_create(dev->proc_name, 0, atm_proc_root, |
439 | &proc_atm_dev_ops); | ||
439 | if (!dev->proc_entry) | 440 | if (!dev->proc_entry) |
440 | goto err_free_name; | 441 | goto err_free_name; |
441 | dev->proc_entry->data = dev; | 442 | dev->proc_entry->data = dev; |
442 | dev->proc_entry->proc_fops = &proc_atm_dev_ops; | ||
443 | dev->proc_entry->owner = THIS_MODULE; | 443 | dev->proc_entry->owner = THIS_MODULE; |
444 | return 0; | 444 | return 0; |
445 | err_free_name: | 445 | err_free_name: |
@@ -492,10 +492,10 @@ int __init atm_proc_init(void) | |||
492 | for (e = atm_proc_ents; e->name; e++) { | 492 | for (e = atm_proc_ents; e->name; e++) { |
493 | struct proc_dir_entry *dirent; | 493 | struct proc_dir_entry *dirent; |
494 | 494 | ||
495 | dirent = create_proc_entry(e->name, S_IRUGO, atm_proc_root); | 495 | dirent = proc_create(e->name, S_IRUGO, |
496 | atm_proc_root, e->proc_fops); | ||
496 | if (!dirent) | 497 | if (!dirent) |
497 | goto err_out_remove; | 498 | goto err_out_remove; |
498 | dirent->proc_fops = e->proc_fops; | ||
499 | dirent->owner = THIS_MODULE; | 499 | dirent->owner = THIS_MODULE; |
500 | e->dirent = dirent; | 500 | e->dirent = dirent; |
501 | } | 501 | } |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index a8811c0a0cea..7c5459c8e8ef 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -417,6 +417,8 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
417 | l2cap_sock_kill(sk); | 417 | l2cap_sock_kill(sk); |
418 | } | 418 | } |
419 | 419 | ||
420 | del_timer_sync(&conn->info_timer); | ||
421 | |||
420 | hcon->l2cap_data = NULL; | 422 | hcon->l2cap_data = NULL; |
421 | kfree(conn); | 423 | kfree(conn); |
422 | } | 424 | } |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 2328acbd16cd..aef01533dfb6 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1389,10 +1389,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl) | |||
1389 | panic("cannot create neighbour cache statistics"); | 1389 | panic("cannot create neighbour cache statistics"); |
1390 | 1390 | ||
1391 | #ifdef CONFIG_PROC_FS | 1391 | #ifdef CONFIG_PROC_FS |
1392 | tbl->pde = create_proc_entry(tbl->id, 0, init_net.proc_net_stat); | 1392 | tbl->pde = proc_create(tbl->id, 0, init_net.proc_net_stat, |
1393 | &neigh_stat_seq_fops); | ||
1393 | if (!tbl->pde) | 1394 | if (!tbl->pde) |
1394 | panic("cannot create neighbour proc dir entry"); | 1395 | panic("cannot create neighbour proc dir entry"); |
1395 | tbl->pde->proc_fops = &neigh_stat_seq_fops; | ||
1396 | tbl->pde->data = tbl; | 1396 | tbl->pde->data = tbl; |
1397 | #endif | 1397 | #endif |
1398 | 1398 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index bfcdfaebca5c..20e63b302ba6 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3570,14 +3570,14 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname) | |||
3570 | if (err) | 3570 | if (err) |
3571 | goto out1; | 3571 | goto out1; |
3572 | 3572 | ||
3573 | pkt_dev->entry = create_proc_entry(ifname, 0600, pg_proc_dir); | 3573 | pkt_dev->entry = proc_create(ifname, 0600, |
3574 | pg_proc_dir, &pktgen_if_fops); | ||
3574 | if (!pkt_dev->entry) { | 3575 | if (!pkt_dev->entry) { |
3575 | printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", | 3576 | printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", |
3576 | PG_PROC_DIR, ifname); | 3577 | PG_PROC_DIR, ifname); |
3577 | err = -EINVAL; | 3578 | err = -EINVAL; |
3578 | goto out2; | 3579 | goto out2; |
3579 | } | 3580 | } |
3580 | pkt_dev->entry->proc_fops = &pktgen_if_fops; | ||
3581 | pkt_dev->entry->data = pkt_dev; | 3581 | pkt_dev->entry->data = pkt_dev; |
3582 | #ifdef CONFIG_XFRM | 3582 | #ifdef CONFIG_XFRM |
3583 | pkt_dev->ipsmode = XFRM_MODE_TRANSPORT; | 3583 | pkt_dev->ipsmode = XFRM_MODE_TRANSPORT; |
@@ -3628,7 +3628,7 @@ static int __init pktgen_create_thread(int cpu) | |||
3628 | kthread_bind(p, cpu); | 3628 | kthread_bind(p, cpu); |
3629 | t->tsk = p; | 3629 | t->tsk = p; |
3630 | 3630 | ||
3631 | pe = create_proc_entry(t->tsk->comm, 0600, pg_proc_dir); | 3631 | pe = proc_create(t->tsk->comm, 0600, pg_proc_dir, &pktgen_thread_fops); |
3632 | if (!pe) { | 3632 | if (!pe) { |
3633 | printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", | 3633 | printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", |
3634 | PG_PROC_DIR, t->tsk->comm); | 3634 | PG_PROC_DIR, t->tsk->comm); |
@@ -3638,7 +3638,6 @@ static int __init pktgen_create_thread(int cpu) | |||
3638 | return -EINVAL; | 3638 | return -EINVAL; |
3639 | } | 3639 | } |
3640 | 3640 | ||
3641 | pe->proc_fops = &pktgen_thread_fops; | ||
3642 | pe->data = t; | 3641 | pe->data = t; |
3643 | 3642 | ||
3644 | wake_up_process(p); | 3643 | wake_up_process(p); |
@@ -3709,7 +3708,7 @@ static int __init pg_init(void) | |||
3709 | return -ENODEV; | 3708 | return -ENODEV; |
3710 | pg_proc_dir->owner = THIS_MODULE; | 3709 | pg_proc_dir->owner = THIS_MODULE; |
3711 | 3710 | ||
3712 | pe = create_proc_entry(PGCTRL, 0600, pg_proc_dir); | 3711 | pe = proc_create(PGCTRL, 0600, pg_proc_dir, &pktgen_fops); |
3713 | if (pe == NULL) { | 3712 | if (pe == NULL) { |
3714 | printk(KERN_ERR "pktgen: ERROR: cannot create %s " | 3713 | printk(KERN_ERR "pktgen: ERROR: cannot create %s " |
3715 | "procfs entry.\n", PGCTRL); | 3714 | "procfs entry.\n", PGCTRL); |
@@ -3717,7 +3716,6 @@ static int __init pg_init(void) | |||
3717 | return -EINVAL; | 3716 | return -EINVAL; |
3718 | } | 3717 | } |
3719 | 3718 | ||
3720 | pe->proc_fops = &pktgen_fops; | ||
3721 | pe->data = NULL; | 3719 | pe->data = NULL; |
3722 | 3720 | ||
3723 | /* Register us to receive netdevice events */ | 3721 | /* Register us to receive netdevice events */ |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f282b26f63eb..87490f7bb0f7 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -752,6 +752,7 @@ int devinet_ioctl(unsigned int cmd, void __user *arg) | |||
752 | inet_del_ifa(in_dev, ifap, 0); | 752 | inet_del_ifa(in_dev, ifap, 0); |
753 | ifa->ifa_broadcast = 0; | 753 | ifa->ifa_broadcast = 0; |
754 | ifa->ifa_anycast = 0; | 754 | ifa->ifa_anycast = 0; |
755 | ifa->ifa_scope = 0; | ||
755 | } | 756 | } |
756 | 757 | ||
757 | ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr; | 758 | ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr; |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 906cb1ada4c3..e7821ba7a9a0 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -266,20 +266,24 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
266 | if (!dev) | 266 | if (!dev) |
267 | return NULL; | 267 | return NULL; |
268 | 268 | ||
269 | if (strchr(name, '%')) { | ||
270 | if (dev_alloc_name(dev, name) < 0) | ||
271 | goto failed_free; | ||
272 | } | ||
273 | |||
269 | dev->init = ipgre_tunnel_init; | 274 | dev->init = ipgre_tunnel_init; |
270 | nt = netdev_priv(dev); | 275 | nt = netdev_priv(dev); |
271 | nt->parms = *parms; | 276 | nt->parms = *parms; |
272 | 277 | ||
273 | if (register_netdevice(dev) < 0) { | 278 | if (register_netdevice(dev) < 0) |
274 | free_netdev(dev); | 279 | goto failed_free; |
275 | goto failed; | ||
276 | } | ||
277 | 280 | ||
278 | dev_hold(dev); | 281 | dev_hold(dev); |
279 | ipgre_tunnel_link(nt); | 282 | ipgre_tunnel_link(nt); |
280 | return nt; | 283 | return nt; |
281 | 284 | ||
282 | failed: | 285 | failed_free: |
286 | free_netdev(dev); | ||
283 | return NULL; | 287 | return NULL; |
284 | } | 288 | } |
285 | 289 | ||
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index ae1f45fc23b9..58b60b2fb011 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
@@ -108,8 +108,11 @@ static int ipcomp_compress(struct xfrm_state *x, struct sk_buff *skb) | |||
108 | const int cpu = get_cpu(); | 108 | const int cpu = get_cpu(); |
109 | u8 *scratch = *per_cpu_ptr(ipcomp_scratches, cpu); | 109 | u8 *scratch = *per_cpu_ptr(ipcomp_scratches, cpu); |
110 | struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); | 110 | struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); |
111 | int err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | 111 | int err; |
112 | 112 | ||
113 | local_bh_disable(); | ||
114 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | ||
115 | local_bh_enable(); | ||
113 | if (err) | 116 | if (err) |
114 | goto out; | 117 | goto out; |
115 | 118 | ||
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index e77e3b855834..dbaed69de06a 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -228,20 +228,24 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c | |||
228 | if (dev == NULL) | 228 | if (dev == NULL) |
229 | return NULL; | 229 | return NULL; |
230 | 230 | ||
231 | if (strchr(name, '%')) { | ||
232 | if (dev_alloc_name(dev, name) < 0) | ||
233 | goto failed_free; | ||
234 | } | ||
235 | |||
231 | nt = netdev_priv(dev); | 236 | nt = netdev_priv(dev); |
232 | dev->init = ipip_tunnel_init; | 237 | dev->init = ipip_tunnel_init; |
233 | nt->parms = *parms; | 238 | nt->parms = *parms; |
234 | 239 | ||
235 | if (register_netdevice(dev) < 0) { | 240 | if (register_netdevice(dev) < 0) |
236 | free_netdev(dev); | 241 | goto failed_free; |
237 | goto failed; | ||
238 | } | ||
239 | 242 | ||
240 | dev_hold(dev); | 243 | dev_hold(dev); |
241 | ipip_tunnel_link(nt); | 244 | ipip_tunnel_link(nt); |
242 | return nt; | 245 | return nt; |
243 | 246 | ||
244 | failed: | 247 | failed_free: |
248 | free_netdev(dev); | ||
245 | return NULL; | 249 | return NULL; |
246 | } | 250 | } |
247 | 251 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 525787b52b72..7b5e8e1d94be 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -542,12 +542,11 @@ static __init int ip_rt_proc_init(struct net *net) | |||
542 | if (!pde) | 542 | if (!pde) |
543 | goto err1; | 543 | goto err1; |
544 | 544 | ||
545 | pde = create_proc_entry("rt_cache", S_IRUGO, net->proc_net_stat); | 545 | pde = proc_create("rt_cache", S_IRUGO, |
546 | net->proc_net_stat, &rt_cpu_seq_fops); | ||
546 | if (!pde) | 547 | if (!pde) |
547 | goto err2; | 548 | goto err2; |
548 | 549 | ||
549 | pde->proc_fops = &rt_cpu_seq_fops; | ||
550 | |||
551 | #ifdef CONFIG_NET_CLS_ROUTE | 550 | #ifdef CONFIG_NET_CLS_ROUTE |
552 | pde = create_proc_read_entry("rt_acct", 0, net->proc_net, | 551 | pde = create_proc_read_entry("rt_acct", 0, net->proc_net, |
553 | ip_rt_acct_read, NULL); | 552 | ip_rt_acct_read, NULL); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e40213db9e4c..101e0e70ba27 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1557,6 +1557,7 @@ addrconf_prefix_route(struct in6_addr *pfx, int plen, struct net_device *dev, | |||
1557 | .fc_expires = expires, | 1557 | .fc_expires = expires, |
1558 | .fc_dst_len = plen, | 1558 | .fc_dst_len = plen, |
1559 | .fc_flags = RTF_UP | flags, | 1559 | .fc_flags = RTF_UP | flags, |
1560 | .fc_nlinfo.nl_net = &init_net, | ||
1560 | }; | 1561 | }; |
1561 | 1562 | ||
1562 | ipv6_addr_copy(&cfg.fc_dst, pfx); | 1563 | ipv6_addr_copy(&cfg.fc_dst, pfx); |
@@ -1583,6 +1584,7 @@ static void addrconf_add_mroute(struct net_device *dev) | |||
1583 | .fc_ifindex = dev->ifindex, | 1584 | .fc_ifindex = dev->ifindex, |
1584 | .fc_dst_len = 8, | 1585 | .fc_dst_len = 8, |
1585 | .fc_flags = RTF_UP, | 1586 | .fc_flags = RTF_UP, |
1587 | .fc_nlinfo.nl_net = &init_net, | ||
1586 | }; | 1588 | }; |
1587 | 1589 | ||
1588 | ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); | 1590 | ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); |
@@ -1599,6 +1601,7 @@ static void sit_route_add(struct net_device *dev) | |||
1599 | .fc_ifindex = dev->ifindex, | 1601 | .fc_ifindex = dev->ifindex, |
1600 | .fc_dst_len = 96, | 1602 | .fc_dst_len = 96, |
1601 | .fc_flags = RTF_UP | RTF_NONEXTHOP, | 1603 | .fc_flags = RTF_UP | RTF_NONEXTHOP, |
1604 | .fc_nlinfo.nl_net = &init_net, | ||
1602 | }; | 1605 | }; |
1603 | 1606 | ||
1604 | /* prefix length - 96 bits "::d.d.d.d" */ | 1607 | /* prefix length - 96 bits "::d.d.d.d" */ |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 2a124e9a1b2d..78f438880923 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -238,17 +238,24 @@ static struct ip6_tnl *ip6_tnl_create(struct ip6_tnl_parm *p) | |||
238 | if (dev == NULL) | 238 | if (dev == NULL) |
239 | goto failed; | 239 | goto failed; |
240 | 240 | ||
241 | if (strchr(name, '%')) { | ||
242 | if (dev_alloc_name(dev, name) < 0) | ||
243 | goto failed_free; | ||
244 | } | ||
245 | |||
241 | t = netdev_priv(dev); | 246 | t = netdev_priv(dev); |
242 | dev->init = ip6_tnl_dev_init; | 247 | dev->init = ip6_tnl_dev_init; |
243 | t->parms = *p; | 248 | t->parms = *p; |
244 | 249 | ||
245 | if ((err = register_netdevice(dev)) < 0) { | 250 | if ((err = register_netdevice(dev)) < 0) |
246 | free_netdev(dev); | 251 | goto failed_free; |
247 | goto failed; | 252 | |
248 | } | ||
249 | dev_hold(dev); | 253 | dev_hold(dev); |
250 | ip6_tnl_link(t); | 254 | ip6_tnl_link(t); |
251 | return t; | 255 | return t; |
256 | |||
257 | failed_free: | ||
258 | free_netdev(dev); | ||
252 | failed: | 259 | failed: |
253 | return NULL; | 260 | return NULL; |
254 | } | 261 | } |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index b90039593a7f..e3dcfa2f436b 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -146,7 +146,9 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); | 146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); |
147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); | 147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); |
148 | 148 | ||
149 | local_bh_disable(); | ||
149 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | 150 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); |
151 | local_bh_enable(); | ||
150 | if (err || (dlen + sizeof(*ipch)) >= plen) { | 152 | if (err || (dlen + sizeof(*ipch)) >= plen) { |
151 | put_cpu(); | 153 | put_cpu(); |
152 | goto out_ok; | 154 | goto out_ok; |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 35e502a72495..199ef379e501 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -217,12 +217,12 @@ int snmp6_register_dev(struct inet6_dev *idev) | |||
217 | if (!proc_net_devsnmp6) | 217 | if (!proc_net_devsnmp6) |
218 | return -ENOENT; | 218 | return -ENOENT; |
219 | 219 | ||
220 | p = create_proc_entry(idev->dev->name, S_IRUGO, proc_net_devsnmp6); | 220 | p = proc_create(idev->dev->name, S_IRUGO, |
221 | proc_net_devsnmp6, &snmp6_seq_fops); | ||
221 | if (!p) | 222 | if (!p) |
222 | return -ENOMEM; | 223 | return -ENOMEM; |
223 | 224 | ||
224 | p->data = idev; | 225 | p->data = idev; |
225 | p->proc_fops = &snmp6_seq_fops; | ||
226 | 226 | ||
227 | idev->stats.proc_dir_entry = p; | 227 | idev->stats.proc_dir_entry = p; |
228 | return 0; | 228 | return 0; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6e7b56ef4449..e8b241cb60bc 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1719,6 +1719,8 @@ static void rtmsg_to_fib6_config(struct in6_rtmsg *rtmsg, | |||
1719 | cfg->fc_src_len = rtmsg->rtmsg_src_len; | 1719 | cfg->fc_src_len = rtmsg->rtmsg_src_len; |
1720 | cfg->fc_flags = rtmsg->rtmsg_flags; | 1720 | cfg->fc_flags = rtmsg->rtmsg_flags; |
1721 | 1721 | ||
1722 | cfg->fc_nlinfo.nl_net = &init_net; | ||
1723 | |||
1722 | ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); | 1724 | ipv6_addr_copy(&cfg->fc_dst, &rtmsg->rtmsg_dst); |
1723 | ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); | 1725 | ipv6_addr_copy(&cfg->fc_src, &rtmsg->rtmsg_src); |
1724 | ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); | 1726 | ipv6_addr_copy(&cfg->fc_gateway, &rtmsg->rtmsg_gateway); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index dde7801abeff..1656c003b989 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -171,6 +171,11 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
171 | if (dev == NULL) | 171 | if (dev == NULL) |
172 | return NULL; | 172 | return NULL; |
173 | 173 | ||
174 | if (strchr(name, '%')) { | ||
175 | if (dev_alloc_name(dev, name) < 0) | ||
176 | goto failed_free; | ||
177 | } | ||
178 | |||
174 | nt = netdev_priv(dev); | 179 | nt = netdev_priv(dev); |
175 | dev->init = ipip6_tunnel_init; | 180 | dev->init = ipip6_tunnel_init; |
176 | nt->parms = *parms; | 181 | nt->parms = *parms; |
@@ -178,16 +183,16 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int | |||
178 | if (parms->i_flags & SIT_ISATAP) | 183 | if (parms->i_flags & SIT_ISATAP) |
179 | dev->priv_flags |= IFF_ISATAP; | 184 | dev->priv_flags |= IFF_ISATAP; |
180 | 185 | ||
181 | if (register_netdevice(dev) < 0) { | 186 | if (register_netdevice(dev) < 0) |
182 | free_netdev(dev); | 187 | goto failed_free; |
183 | goto failed; | ||
184 | } | ||
185 | 188 | ||
186 | dev_hold(dev); | 189 | dev_hold(dev); |
187 | 190 | ||
188 | ipip6_tunnel_link(nt); | 191 | ipip6_tunnel_link(nt); |
189 | return nt; | 192 | return nt; |
190 | 193 | ||
194 | failed_free: | ||
195 | free_netdev(dev); | ||
191 | failed: | 196 | failed: |
192 | return NULL; | 197 | return NULL; |
193 | } | 198 | } |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 408691b777c2..d6d3e68086f8 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -102,9 +102,6 @@ static int ipv6_sysctl_net_init(struct net *net) | |||
102 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, | 102 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, |
103 | ipv6_table); | 103 | ipv6_table); |
104 | if (!net->ipv6.sysctl.table) | 104 | if (!net->ipv6.sysctl.table) |
105 | return -ENOMEM; | ||
106 | |||
107 | if (!net->ipv6.sysctl.table) | ||
108 | goto out_ipv6_icmp_table; | 105 | goto out_ipv6_icmp_table; |
109 | 106 | ||
110 | err = 0; | 107 | err = 0; |
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index d483a00dc427..5ed97ad0e2e3 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c | |||
@@ -358,22 +358,19 @@ int __init ipx_proc_init(void) | |||
358 | 358 | ||
359 | if (!ipx_proc_dir) | 359 | if (!ipx_proc_dir) |
360 | goto out; | 360 | goto out; |
361 | p = create_proc_entry("interface", S_IRUGO, ipx_proc_dir); | 361 | p = proc_create("interface", S_IRUGO, |
362 | ipx_proc_dir, &ipx_seq_interface_fops); | ||
362 | if (!p) | 363 | if (!p) |
363 | goto out_interface; | 364 | goto out_interface; |
364 | 365 | ||
365 | p->proc_fops = &ipx_seq_interface_fops; | 366 | p = proc_create("route", S_IRUGO, ipx_proc_dir, &ipx_seq_route_fops); |
366 | p = create_proc_entry("route", S_IRUGO, ipx_proc_dir); | ||
367 | if (!p) | 367 | if (!p) |
368 | goto out_route; | 368 | goto out_route; |
369 | 369 | ||
370 | p->proc_fops = &ipx_seq_route_fops; | 370 | p = proc_create("socket", S_IRUGO, ipx_proc_dir, &ipx_seq_socket_fops); |
371 | p = create_proc_entry("socket", S_IRUGO, ipx_proc_dir); | ||
372 | if (!p) | 371 | if (!p) |
373 | goto out_socket; | 372 | goto out_socket; |
374 | 373 | ||
375 | p->proc_fops = &ipx_seq_socket_fops; | ||
376 | |||
377 | rc = 0; | 374 | rc = 0; |
378 | out: | 375 | out: |
379 | return rc; | 376 | return rc; |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 1c853927810a..8b5f486ac80f 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -3807,17 +3807,16 @@ static int pfkey_init_proc(void) | |||
3807 | { | 3807 | { |
3808 | struct proc_dir_entry *e; | 3808 | struct proc_dir_entry *e; |
3809 | 3809 | ||
3810 | e = create_proc_entry("pfkey", 0, init_net.proc_net); | 3810 | e = proc_net_fops_create(&init_net, "pfkey", 0, &pfkey_proc_ops); |
3811 | if (e == NULL) | 3811 | if (e == NULL) |
3812 | return -ENOMEM; | 3812 | return -ENOMEM; |
3813 | 3813 | ||
3814 | e->proc_fops = &pfkey_proc_ops; | ||
3815 | return 0; | 3814 | return 0; |
3816 | } | 3815 | } |
3817 | 3816 | ||
3818 | static void pfkey_exit_proc(void) | 3817 | static void pfkey_exit_proc(void) |
3819 | { | 3818 | { |
3820 | remove_proc_entry("net/pfkey", NULL); | 3819 | proc_net_remove(&init_net, "pfkey"); |
3821 | } | 3820 | } |
3822 | #else | 3821 | #else |
3823 | static inline int pfkey_init_proc(void) | 3822 | static inline int pfkey_init_proc(void) |
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index cb34bc0518e8..48212c0a961c 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c | |||
@@ -239,18 +239,14 @@ int __init llc_proc_init(void) | |||
239 | goto out; | 239 | goto out; |
240 | llc_proc_dir->owner = THIS_MODULE; | 240 | llc_proc_dir->owner = THIS_MODULE; |
241 | 241 | ||
242 | p = create_proc_entry("socket", S_IRUGO, llc_proc_dir); | 242 | p = proc_create("socket", S_IRUGO, llc_proc_dir, &llc_seq_socket_fops); |
243 | if (!p) | 243 | if (!p) |
244 | goto out_socket; | 244 | goto out_socket; |
245 | 245 | ||
246 | p->proc_fops = &llc_seq_socket_fops; | 246 | p = proc_create("core", S_IRUGO, llc_proc_dir, &llc_seq_core_fops); |
247 | |||
248 | p = create_proc_entry("core", S_IRUGO, llc_proc_dir); | ||
249 | if (!p) | 247 | if (!p) |
250 | goto out_core; | 248 | goto out_core; |
251 | 249 | ||
252 | p->proc_fops = &llc_seq_core_fops; | ||
253 | |||
254 | rc = 0; | 250 | rc = 0; |
255 | out: | 251 | out: |
256 | return rc; | 252 | return rc; |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 2019b4f0528d..9aeed5320228 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1116 | /* prepare reordering buffer */ | 1116 | /* prepare reordering buffer */ |
1117 | tid_agg_rx->reorder_buf = | 1117 | tid_agg_rx->reorder_buf = |
1118 | kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); | 1118 | kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); |
1119 | if ((!tid_agg_rx->reorder_buf) && net_ratelimit()) { | 1119 | if (!tid_agg_rx->reorder_buf) { |
1120 | printk(KERN_ERR "can not allocate reordering buffer " | 1120 | if (net_ratelimit()) |
1121 | "to tid %d\n", tid); | 1121 | printk(KERN_ERR "can not allocate reordering buffer " |
1122 | "to tid %d\n", tid); | ||
1122 | goto end; | 1123 | goto end; |
1123 | } | 1124 | } |
1124 | memset(tid_agg_rx->reorder_buf, 0, | 1125 | memset(tid_agg_rx->reorder_buf, 0, |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 327e847d2702..b77eb56a87e3 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -256,13 +256,19 @@ __nf_conntrack_find(const struct nf_conntrack_tuple *tuple) | |||
256 | struct hlist_node *n; | 256 | struct hlist_node *n; |
257 | unsigned int hash = hash_conntrack(tuple); | 257 | unsigned int hash = hash_conntrack(tuple); |
258 | 258 | ||
259 | /* Disable BHs the entire time since we normally need to disable them | ||
260 | * at least once for the stats anyway. | ||
261 | */ | ||
262 | local_bh_disable(); | ||
259 | hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) { | 263 | hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) { |
260 | if (nf_ct_tuple_equal(tuple, &h->tuple)) { | 264 | if (nf_ct_tuple_equal(tuple, &h->tuple)) { |
261 | NF_CT_STAT_INC(found); | 265 | NF_CT_STAT_INC(found); |
266 | local_bh_enable(); | ||
262 | return h; | 267 | return h; |
263 | } | 268 | } |
264 | NF_CT_STAT_INC(searched); | 269 | NF_CT_STAT_INC(searched); |
265 | } | 270 | } |
271 | local_bh_enable(); | ||
266 | 272 | ||
267 | return NULL; | 273 | return NULL; |
268 | } | 274 | } |
@@ -400,17 +406,20 @@ nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple, | |||
400 | struct hlist_node *n; | 406 | struct hlist_node *n; |
401 | unsigned int hash = hash_conntrack(tuple); | 407 | unsigned int hash = hash_conntrack(tuple); |
402 | 408 | ||
403 | rcu_read_lock(); | 409 | /* Disable BHs the entire time since we need to disable them at |
410 | * least once for the stats anyway. | ||
411 | */ | ||
412 | rcu_read_lock_bh(); | ||
404 | hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) { | 413 | hlist_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash], hnode) { |
405 | if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack && | 414 | if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack && |
406 | nf_ct_tuple_equal(tuple, &h->tuple)) { | 415 | nf_ct_tuple_equal(tuple, &h->tuple)) { |
407 | NF_CT_STAT_INC(found); | 416 | NF_CT_STAT_INC(found); |
408 | rcu_read_unlock(); | 417 | rcu_read_unlock_bh(); |
409 | return 1; | 418 | return 1; |
410 | } | 419 | } |
411 | NF_CT_STAT_INC(searched); | 420 | NF_CT_STAT_INC(searched); |
412 | } | 421 | } |
413 | rcu_read_unlock(); | 422 | rcu_read_unlock_bh(); |
414 | 423 | ||
415 | return 0; | 424 | return 0; |
416 | } | 425 | } |
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c index 85330856a29c..0c50b2894055 100644 --- a/net/netfilter/xt_conntrack.c +++ b/net/netfilter/xt_conntrack.c | |||
@@ -122,7 +122,7 @@ conntrack_addrcmp(const union nf_inet_addr *kaddr, | |||
122 | const union nf_inet_addr *umask, unsigned int l3proto) | 122 | const union nf_inet_addr *umask, unsigned int l3proto) |
123 | { | 123 | { |
124 | if (l3proto == AF_INET) | 124 | if (l3proto == AF_INET) |
125 | return (kaddr->ip & umask->ip) == uaddr->ip; | 125 | return ((kaddr->ip ^ uaddr->ip) & umask->ip) == 0; |
126 | else if (l3proto == AF_INET6) | 126 | else if (l3proto == AF_INET6) |
127 | return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6, | 127 | return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6, |
128 | &uaddr->in6) == 0; | 128 | &uaddr->in6) == 0; |
@@ -231,7 +231,7 @@ conntrack_mt(const struct sk_buff *skb, const struct net_device *in, | |||
231 | if (test_bit(IPS_DST_NAT_BIT, &ct->status)) | 231 | if (test_bit(IPS_DST_NAT_BIT, &ct->status)) |
232 | statebit |= XT_CONNTRACK_STATE_DNAT; | 232 | statebit |= XT_CONNTRACK_STATE_DNAT; |
233 | } | 233 | } |
234 | if ((info->state_mask & statebit) ^ | 234 | if (!!(info->state_mask & statebit) ^ |
235 | !(info->invert_flags & XT_CONNTRACK_STATE)) | 235 | !(info->invert_flags & XT_CONNTRACK_STATE)) |
236 | return false; | 236 | return false; |
237 | } | 237 | } |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 8bb79f281774..675a5c3e68a6 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -838,11 +838,11 @@ int sctp_auth_set_key(struct sctp_endpoint *ep, | |||
838 | } | 838 | } |
839 | 839 | ||
840 | /* Create a new key data based on the info passed in */ | 840 | /* Create a new key data based on the info passed in */ |
841 | key = sctp_auth_create_key(auth_key->sca_keylen, GFP_KERNEL); | 841 | key = sctp_auth_create_key(auth_key->sca_keylength, GFP_KERNEL); |
842 | if (!key) | 842 | if (!key) |
843 | goto nomem; | 843 | goto nomem; |
844 | 844 | ||
845 | memcpy(key->data, &auth_key->sca_key[0], auth_key->sca_keylen); | 845 | memcpy(key->data, &auth_key->sca_key[0], auth_key->sca_keylength); |
846 | 846 | ||
847 | /* If we are replacing, remove the old keys data from the | 847 | /* If we are replacing, remove the old keys data from the |
848 | * key id. If we are adding new key id, add it to the | 848 | * key id. If we are adding new key id, add it to the |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 4d7ec961ae1d..87f940587d5f 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -966,7 +966,7 @@ static struct inet6_protocol sctpv6_protocol = { | |||
966 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_FINAL, | 966 | .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_FINAL, |
967 | }; | 967 | }; |
968 | 968 | ||
969 | static struct sctp_af sctp_ipv6_specific = { | 969 | static struct sctp_af sctp_af_inet6 = { |
970 | .sa_family = AF_INET6, | 970 | .sa_family = AF_INET6, |
971 | .sctp_xmit = sctp_v6_xmit, | 971 | .sctp_xmit = sctp_v6_xmit, |
972 | .setsockopt = ipv6_setsockopt, | 972 | .setsockopt = ipv6_setsockopt, |
@@ -998,7 +998,7 @@ static struct sctp_af sctp_ipv6_specific = { | |||
998 | #endif | 998 | #endif |
999 | }; | 999 | }; |
1000 | 1000 | ||
1001 | static struct sctp_pf sctp_pf_inet6_specific = { | 1001 | static struct sctp_pf sctp_pf_inet6 = { |
1002 | .event_msgname = sctp_inet6_event_msgname, | 1002 | .event_msgname = sctp_inet6_event_msgname, |
1003 | .skb_msgname = sctp_inet6_skb_msgname, | 1003 | .skb_msgname = sctp_inet6_skb_msgname, |
1004 | .af_supported = sctp_inet6_af_supported, | 1004 | .af_supported = sctp_inet6_af_supported, |
@@ -1008,7 +1008,7 @@ static struct sctp_pf sctp_pf_inet6_specific = { | |||
1008 | .supported_addrs = sctp_inet6_supported_addrs, | 1008 | .supported_addrs = sctp_inet6_supported_addrs, |
1009 | .create_accept_sk = sctp_v6_create_accept_sk, | 1009 | .create_accept_sk = sctp_v6_create_accept_sk, |
1010 | .addr_v4map = sctp_v6_addr_v4map, | 1010 | .addr_v4map = sctp_v6_addr_v4map, |
1011 | .af = &sctp_ipv6_specific, | 1011 | .af = &sctp_af_inet6, |
1012 | }; | 1012 | }; |
1013 | 1013 | ||
1014 | /* Initialize IPv6 support and register with socket layer. */ | 1014 | /* Initialize IPv6 support and register with socket layer. */ |
@@ -1017,10 +1017,10 @@ int sctp_v6_init(void) | |||
1017 | int rc; | 1017 | int rc; |
1018 | 1018 | ||
1019 | /* Register the SCTP specific PF_INET6 functions. */ | 1019 | /* Register the SCTP specific PF_INET6 functions. */ |
1020 | sctp_register_pf(&sctp_pf_inet6_specific, PF_INET6); | 1020 | sctp_register_pf(&sctp_pf_inet6, PF_INET6); |
1021 | 1021 | ||
1022 | /* Register the SCTP specific AF_INET6 functions. */ | 1022 | /* Register the SCTP specific AF_INET6 functions. */ |
1023 | sctp_register_af(&sctp_ipv6_specific); | 1023 | sctp_register_af(&sctp_af_inet6); |
1024 | 1024 | ||
1025 | rc = proto_register(&sctpv6_prot, 1); | 1025 | rc = proto_register(&sctpv6_prot, 1); |
1026 | if (rc) | 1026 | if (rc) |
@@ -1051,7 +1051,7 @@ void sctp_v6_exit(void) | |||
1051 | inet6_unregister_protosw(&sctpv6_seqpacket_protosw); | 1051 | inet6_unregister_protosw(&sctpv6_seqpacket_protosw); |
1052 | inet6_unregister_protosw(&sctpv6_stream_protosw); | 1052 | inet6_unregister_protosw(&sctpv6_stream_protosw); |
1053 | proto_unregister(&sctpv6_prot); | 1053 | proto_unregister(&sctpv6_prot); |
1054 | list_del(&sctp_ipv6_specific.list); | 1054 | list_del(&sctp_af_inet6.list); |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | /* Unregister with inet6 layer. */ | 1057 | /* Unregister with inet6 layer. */ |
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c index 14e294e37626..cfeb07ea1b04 100644 --- a/net/sctp/objcnt.c +++ b/net/sctp/objcnt.c | |||
@@ -132,12 +132,11 @@ void sctp_dbg_objcnt_init(void) | |||
132 | { | 132 | { |
133 | struct proc_dir_entry *ent; | 133 | struct proc_dir_entry *ent; |
134 | 134 | ||
135 | ent = create_proc_entry("sctp_dbg_objcnt", 0, proc_net_sctp); | 135 | ent = proc_create("sctp_dbg_objcnt", 0, |
136 | proc_net_sctp, &sctp_objcnt_ops); | ||
136 | if (!ent) | 137 | if (!ent) |
137 | printk(KERN_WARNING | 138 | printk(KERN_WARNING |
138 | "sctp_dbg_objcnt: Unable to create /proc entry.\n"); | 139 | "sctp_dbg_objcnt: Unable to create /proc entry.\n"); |
139 | else | ||
140 | ent->proc_fops = &sctp_objcnt_ops; | ||
141 | } | 140 | } |
142 | 141 | ||
143 | /* Cleanup the objcount entry in the proc filesystem. */ | 142 | /* Cleanup the objcount entry in the proc filesystem. */ |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 69bb5a63fd8b..9e214da82d9e 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -108,12 +108,10 @@ int __init sctp_snmp_proc_init(void) | |||
108 | { | 108 | { |
109 | struct proc_dir_entry *p; | 109 | struct proc_dir_entry *p; |
110 | 110 | ||
111 | p = create_proc_entry("snmp", S_IRUGO, proc_net_sctp); | 111 | p = proc_create("snmp", S_IRUGO, proc_net_sctp, &sctp_snmp_seq_fops); |
112 | if (!p) | 112 | if (!p) |
113 | return -ENOMEM; | 113 | return -ENOMEM; |
114 | 114 | ||
115 | p->proc_fops = &sctp_snmp_seq_fops; | ||
116 | |||
117 | return 0; | 115 | return 0; |
118 | } | 116 | } |
119 | 117 | ||
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 22a16571499c..688546dccd82 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -832,7 +832,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb, | |||
832 | return ip_queue_xmit(skb, ipfragok); | 832 | return ip_queue_xmit(skb, ipfragok); |
833 | } | 833 | } |
834 | 834 | ||
835 | static struct sctp_af sctp_ipv4_specific; | 835 | static struct sctp_af sctp_af_inet; |
836 | 836 | ||
837 | static struct sctp_pf sctp_pf_inet = { | 837 | static struct sctp_pf sctp_pf_inet = { |
838 | .event_msgname = sctp_inet_event_msgname, | 838 | .event_msgname = sctp_inet_event_msgname, |
@@ -844,7 +844,7 @@ static struct sctp_pf sctp_pf_inet = { | |||
844 | .supported_addrs = sctp_inet_supported_addrs, | 844 | .supported_addrs = sctp_inet_supported_addrs, |
845 | .create_accept_sk = sctp_v4_create_accept_sk, | 845 | .create_accept_sk = sctp_v4_create_accept_sk, |
846 | .addr_v4map = sctp_v4_addr_v4map, | 846 | .addr_v4map = sctp_v4_addr_v4map, |
847 | .af = &sctp_ipv4_specific, | 847 | .af = &sctp_af_inet |
848 | }; | 848 | }; |
849 | 849 | ||
850 | /* Notifier for inetaddr addition/deletion events. */ | 850 | /* Notifier for inetaddr addition/deletion events. */ |
@@ -906,7 +906,7 @@ static struct net_protocol sctp_protocol = { | |||
906 | }; | 906 | }; |
907 | 907 | ||
908 | /* IPv4 address related functions. */ | 908 | /* IPv4 address related functions. */ |
909 | static struct sctp_af sctp_ipv4_specific = { | 909 | static struct sctp_af sctp_af_inet = { |
910 | .sa_family = AF_INET, | 910 | .sa_family = AF_INET, |
911 | .sctp_xmit = sctp_v4_xmit, | 911 | .sctp_xmit = sctp_v4_xmit, |
912 | .setsockopt = ip_setsockopt, | 912 | .setsockopt = ip_setsockopt, |
@@ -1192,7 +1192,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1192 | sctp_sysctl_register(); | 1192 | sctp_sysctl_register(); |
1193 | 1193 | ||
1194 | INIT_LIST_HEAD(&sctp_address_families); | 1194 | INIT_LIST_HEAD(&sctp_address_families); |
1195 | sctp_register_af(&sctp_ipv4_specific); | 1195 | sctp_register_af(&sctp_af_inet); |
1196 | 1196 | ||
1197 | status = proto_register(&sctp_prot, 1); | 1197 | status = proto_register(&sctp_prot, 1); |
1198 | if (status) | 1198 | if (status) |
@@ -1249,7 +1249,7 @@ err_v6_init: | |||
1249 | proto_unregister(&sctp_prot); | 1249 | proto_unregister(&sctp_prot); |
1250 | err_proto_register: | 1250 | err_proto_register: |
1251 | sctp_sysctl_unregister(); | 1251 | sctp_sysctl_unregister(); |
1252 | list_del(&sctp_ipv4_specific.list); | 1252 | list_del(&sctp_af_inet.list); |
1253 | free_pages((unsigned long)sctp_port_hashtable, | 1253 | free_pages((unsigned long)sctp_port_hashtable, |
1254 | get_order(sctp_port_hashsize * | 1254 | get_order(sctp_port_hashsize * |
1255 | sizeof(struct sctp_bind_hashbucket))); | 1255 | sizeof(struct sctp_bind_hashbucket))); |
@@ -1299,7 +1299,7 @@ SCTP_STATIC __exit void sctp_exit(void) | |||
1299 | inet_unregister_protosw(&sctp_seqpacket_protosw); | 1299 | inet_unregister_protosw(&sctp_seqpacket_protosw); |
1300 | 1300 | ||
1301 | sctp_sysctl_unregister(); | 1301 | sctp_sysctl_unregister(); |
1302 | list_del(&sctp_ipv4_specific.list); | 1302 | list_del(&sctp_af_inet.list); |
1303 | 1303 | ||
1304 | free_pages((unsigned long)sctp_assoc_hashtable, | 1304 | free_pages((unsigned long)sctp_assoc_hashtable, |
1305 | get_order(sctp_assoc_hashsize * | 1305 | get_order(sctp_assoc_hashsize * |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 44797ad88a05..939892691a26 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1964,7 +1964,7 @@ static int sctp_setsockopt_disable_fragments(struct sock *sk, | |||
1964 | static int sctp_setsockopt_events(struct sock *sk, char __user *optval, | 1964 | static int sctp_setsockopt_events(struct sock *sk, char __user *optval, |
1965 | int optlen) | 1965 | int optlen) |
1966 | { | 1966 | { |
1967 | if (optlen != sizeof(struct sctp_event_subscribe)) | 1967 | if (optlen > sizeof(struct sctp_event_subscribe)) |
1968 | return -EINVAL; | 1968 | return -EINVAL; |
1969 | if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) | 1969 | if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) |
1970 | return -EFAULT; | 1970 | return -EFAULT; |
@@ -5070,6 +5070,7 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len, | |||
5070 | struct sctp_authchunks val; | 5070 | struct sctp_authchunks val; |
5071 | struct sctp_association *asoc; | 5071 | struct sctp_association *asoc; |
5072 | struct sctp_chunks_param *ch; | 5072 | struct sctp_chunks_param *ch; |
5073 | u32 num_chunks; | ||
5073 | char __user *to; | 5074 | char __user *to; |
5074 | 5075 | ||
5075 | if (len <= sizeof(struct sctp_authchunks)) | 5076 | if (len <= sizeof(struct sctp_authchunks)) |
@@ -5086,12 +5087,15 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len, | |||
5086 | ch = asoc->peer.peer_chunks; | 5087 | ch = asoc->peer.peer_chunks; |
5087 | 5088 | ||
5088 | /* See if the user provided enough room for all the data */ | 5089 | /* See if the user provided enough room for all the data */ |
5089 | if (len < ntohs(ch->param_hdr.length)) | 5090 | num_chunks = ntohs(ch->param_hdr.length) - sizeof(sctp_paramhdr_t); |
5091 | if (len < num_chunks) | ||
5090 | return -EINVAL; | 5092 | return -EINVAL; |
5091 | 5093 | ||
5092 | len = ntohs(ch->param_hdr.length); | 5094 | len = num_chunks; |
5093 | if (put_user(len, optlen)) | 5095 | if (put_user(len, optlen)) |
5094 | return -EFAULT; | 5096 | return -EFAULT; |
5097 | if (put_user(num_chunks, &p->gauth_number_of_chunks)) | ||
5098 | return -EFAULT; | ||
5095 | if (copy_to_user(to, ch->chunks, len)) | 5099 | if (copy_to_user(to, ch->chunks, len)) |
5096 | return -EFAULT; | 5100 | return -EFAULT; |
5097 | 5101 | ||
@@ -5105,6 +5109,7 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len, | |||
5105 | struct sctp_authchunks val; | 5109 | struct sctp_authchunks val; |
5106 | struct sctp_association *asoc; | 5110 | struct sctp_association *asoc; |
5107 | struct sctp_chunks_param *ch; | 5111 | struct sctp_chunks_param *ch; |
5112 | u32 num_chunks; | ||
5108 | char __user *to; | 5113 | char __user *to; |
5109 | 5114 | ||
5110 | if (len <= sizeof(struct sctp_authchunks)) | 5115 | if (len <= sizeof(struct sctp_authchunks)) |
@@ -5123,12 +5128,15 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len, | |||
5123 | else | 5128 | else |
5124 | ch = sctp_sk(sk)->ep->auth_chunk_list; | 5129 | ch = sctp_sk(sk)->ep->auth_chunk_list; |
5125 | 5130 | ||
5126 | if (len < ntohs(ch->param_hdr.length)) | 5131 | num_chunks = ntohs(ch->param_hdr.length) - sizeof(sctp_paramhdr_t); |
5132 | if (len < num_chunks) | ||
5127 | return -EINVAL; | 5133 | return -EINVAL; |
5128 | 5134 | ||
5129 | len = ntohs(ch->param_hdr.length); | 5135 | len = num_chunks; |
5130 | if (put_user(len, optlen)) | 5136 | if (put_user(len, optlen)) |
5131 | return -EFAULT; | 5137 | return -EFAULT; |
5138 | if (put_user(num_chunks, &p->gauth_number_of_chunks)) | ||
5139 | return -EFAULT; | ||
5132 | if (copy_to_user(to, ch->chunks, len)) | 5140 | if (copy_to_user(to, ch->chunks, len)) |
5133 | return -EFAULT; | 5141 | return -EFAULT; |
5134 | 5142 | ||
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index e27b11f18b7f..b43f1f110f87 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
@@ -206,7 +206,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( | |||
206 | * This field is the total length of the notification data, including | 206 | * This field is the total length of the notification data, including |
207 | * the notification header. | 207 | * the notification header. |
208 | */ | 208 | */ |
209 | sac->sac_length = sizeof(struct sctp_assoc_change); | 209 | sac->sac_length = skb->len; |
210 | 210 | ||
211 | /* Socket Extensions for SCTP | 211 | /* Socket Extensions for SCTP |
212 | * 5.3.1.1 SCTP_ASSOC_CHANGE | 212 | * 5.3.1.1 SCTP_ASSOC_CHANGE |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 636c8e04e0be..b5f2786251b9 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -316,31 +316,29 @@ static int create_cache_proc_entries(struct cache_detail *cd) | |||
316 | cd->proc_ent->owner = cd->owner; | 316 | cd->proc_ent->owner = cd->owner; |
317 | cd->channel_ent = cd->content_ent = NULL; | 317 | cd->channel_ent = cd->content_ent = NULL; |
318 | 318 | ||
319 | p = create_proc_entry("flush", S_IFREG|S_IRUSR|S_IWUSR, cd->proc_ent); | 319 | p = proc_create("flush", S_IFREG|S_IRUSR|S_IWUSR, |
320 | cd->proc_ent, &cache_flush_operations); | ||
320 | cd->flush_ent = p; | 321 | cd->flush_ent = p; |
321 | if (p == NULL) | 322 | if (p == NULL) |
322 | goto out_nomem; | 323 | goto out_nomem; |
323 | p->proc_fops = &cache_flush_operations; | ||
324 | p->owner = cd->owner; | 324 | p->owner = cd->owner; |
325 | p->data = cd; | 325 | p->data = cd; |
326 | 326 | ||
327 | if (cd->cache_request || cd->cache_parse) { | 327 | if (cd->cache_request || cd->cache_parse) { |
328 | p = create_proc_entry("channel", S_IFREG|S_IRUSR|S_IWUSR, | 328 | p = proc_create("channel", S_IFREG|S_IRUSR|S_IWUSR, |
329 | cd->proc_ent); | 329 | cd->proc_ent, &cache_file_operations); |
330 | cd->channel_ent = p; | 330 | cd->channel_ent = p; |
331 | if (p == NULL) | 331 | if (p == NULL) |
332 | goto out_nomem; | 332 | goto out_nomem; |
333 | p->proc_fops = &cache_file_operations; | ||
334 | p->owner = cd->owner; | 333 | p->owner = cd->owner; |
335 | p->data = cd; | 334 | p->data = cd; |
336 | } | 335 | } |
337 | if (cd->cache_show) { | 336 | if (cd->cache_show) { |
338 | p = create_proc_entry("content", S_IFREG|S_IRUSR|S_IWUSR, | 337 | p = proc_create("content", S_IFREG|S_IRUSR|S_IWUSR, |
339 | cd->proc_ent); | 338 | cd->proc_ent, &content_file_operations); |
340 | cd->content_ent = p; | 339 | cd->content_ent = p; |
341 | if (p == NULL) | 340 | if (p == NULL) |
342 | goto out_nomem; | 341 | goto out_nomem; |
343 | p->proc_fops = &content_file_operations; | ||
344 | p->owner = cd->owner; | 342 | p->owner = cd->owner; |
345 | p->data = cd; | 343 | p->data = cd; |
346 | } | 344 | } |
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 5a16875f5ac8..c6061a4346c8 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -229,9 +229,8 @@ do_register(const char *name, void *data, const struct file_operations *fops) | |||
229 | rpc_proc_init(); | 229 | rpc_proc_init(); |
230 | dprintk("RPC: registering /proc/net/rpc/%s\n", name); | 230 | dprintk("RPC: registering /proc/net/rpc/%s\n", name); |
231 | 231 | ||
232 | ent = create_proc_entry(name, 0, proc_net_rpc); | 232 | ent = proc_create(name, 0, proc_net_rpc, fops); |
233 | if (ent) { | 233 | if (ent) { |
234 | ent->proc_fops = fops; | ||
235 | ent->data = data; | 234 | ent->data = data; |
236 | } | 235 | } |
237 | return ent; | 236 | return ent; |
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index 95b373913aa0..4bb3404f610b 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
@@ -142,7 +142,7 @@ void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr) | |||
142 | max_n_num = tipc_highest_allowed_slave; | 142 | max_n_num = tipc_highest_allowed_slave; |
143 | assert(n_num > 0); | 143 | assert(n_num > 0); |
144 | assert(n_num <= max_n_num); | 144 | assert(n_num <= max_n_num); |
145 | assert(c_ptr->nodes[n_num] == 0); | 145 | assert(c_ptr->nodes[n_num] == NULL); |
146 | c_ptr->nodes[n_num] = n_ptr; | 146 | c_ptr->nodes[n_num] = n_ptr; |
147 | if (n_num > c_ptr->highest_node) | 147 | if (n_num > c_ptr->highest_node) |
148 | c_ptr->highest_node = n_num; | 148 | c_ptr->highest_node = n_num; |
diff --git a/net/tipc/link.c b/net/tipc/link.c index 1b17fecee747..cefa99824c58 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -3251,7 +3251,7 @@ static void link_print(struct link *l_ptr, struct print_buf *buf, | |||
3251 | if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) - | 3251 | if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) - |
3252 | msg_seqno(buf_msg(l_ptr->first_out))) | 3252 | msg_seqno(buf_msg(l_ptr->first_out))) |
3253 | != (l_ptr->out_queue_size - 1)) | 3253 | != (l_ptr->out_queue_size - 1)) |
3254 | || (l_ptr->last_out->next != 0)) { | 3254 | || (l_ptr->last_out->next != NULL)) { |
3255 | tipc_printf(buf, "\nSend queue inconsistency\n"); | 3255 | tipc_printf(buf, "\nSend queue inconsistency\n"); |
3256 | tipc_printf(buf, "first_out= %x ", l_ptr->first_out); | 3256 | tipc_printf(buf, "first_out= %x ", l_ptr->first_out); |
3257 | tipc_printf(buf, "next_out= %x ", l_ptr->next_out); | 3257 | tipc_printf(buf, "next_out= %x ", l_ptr->next_out); |
diff --git a/net/tipc/ref.c b/net/tipc/ref.c index 6704a58c7851..c38744c96ed1 100644 --- a/net/tipc/ref.c +++ b/net/tipc/ref.c | |||
@@ -148,7 +148,7 @@ u32 tipc_ref_acquire(void *object, spinlock_t **lock) | |||
148 | reference = (next_plus_upper & ~index_mask) + index; | 148 | reference = (next_plus_upper & ~index_mask) + index; |
149 | entry->data.reference = reference; | 149 | entry->data.reference = reference; |
150 | entry->object = object; | 150 | entry->object = object; |
151 | if (lock != 0) | 151 | if (lock != NULL) |
152 | *lock = &entry->lock; | 152 | *lock = &entry->lock; |
153 | spin_unlock_bh(&entry->lock); | 153 | spin_unlock_bh(&entry->lock); |
154 | } | 154 | } |
diff --git a/net/tipc/zone.c b/net/tipc/zone.c index 114e173f11a5..3506f8563441 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c | |||
@@ -82,7 +82,7 @@ void tipc_zone_attach_cluster(struct _zone *z_ptr, struct cluster *c_ptr) | |||
82 | 82 | ||
83 | assert(c_ptr->addr); | 83 | assert(c_ptr->addr); |
84 | assert(c_num <= tipc_max_clusters); | 84 | assert(c_num <= tipc_max_clusters); |
85 | assert(z_ptr->clusters[c_num] == 0); | 85 | assert(z_ptr->clusters[c_num] == NULL); |
86 | z_ptr->clusters[c_num] = c_ptr; | 86 | z_ptr->clusters[c_num] = c_ptr; |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index f2e54c3f064e..5bebe40bf4e6 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -292,14 +292,12 @@ int __init wanrouter_proc_init(void) | |||
292 | if (!proc_router) | 292 | if (!proc_router) |
293 | goto fail; | 293 | goto fail; |
294 | 294 | ||
295 | p = create_proc_entry("config", S_IRUGO, proc_router); | 295 | p = proc_create("config", S_IRUGO, proc_router, &config_fops); |
296 | if (!p) | 296 | if (!p) |
297 | goto fail_config; | 297 | goto fail_config; |
298 | p->proc_fops = &config_fops; | 298 | p = proc_create("status", S_IRUGO, proc_router, &status_fops); |
299 | p = create_proc_entry("status", S_IRUGO, proc_router); | ||
300 | if (!p) | 299 | if (!p) |
301 | goto fail_stat; | 300 | goto fail_stat; |
302 | p->proc_fops = &status_fops; | ||
303 | return 0; | 301 | return 0; |
304 | fail_stat: | 302 | fail_stat: |
305 | remove_proc_entry("config", proc_router); | 303 | remove_proc_entry("config", proc_router); |
@@ -329,10 +327,10 @@ int wanrouter_proc_add(struct wan_device* wandev) | |||
329 | if (wandev->magic != ROUTER_MAGIC) | 327 | if (wandev->magic != ROUTER_MAGIC) |
330 | return -EINVAL; | 328 | return -EINVAL; |
331 | 329 | ||
332 | wandev->dent = create_proc_entry(wandev->name, S_IRUGO, proc_router); | 330 | wandev->dent = proc_create(wandev->name, S_IRUGO, |
331 | proc_router, &wandev_fops); | ||
333 | if (!wandev->dent) | 332 | if (!wandev->dent) |
334 | return -ENOMEM; | 333 | return -ENOMEM; |
335 | wandev->dent->proc_fops = &wandev_fops; | ||
336 | wandev->dent->data = wandev; | 334 | wandev->dent->data = wandev; |
337 | return 0; | 335 | return 0; |
338 | } | 336 | } |
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index 3f52b09bed03..1afa44d25beb 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c | |||
@@ -312,20 +312,18 @@ int __init x25_proc_init(void) | |||
312 | if (!x25_proc_dir) | 312 | if (!x25_proc_dir) |
313 | goto out; | 313 | goto out; |
314 | 314 | ||
315 | p = create_proc_entry("route", S_IRUGO, x25_proc_dir); | 315 | p = proc_create("route", S_IRUGO, x25_proc_dir, &x25_seq_route_fops); |
316 | if (!p) | 316 | if (!p) |
317 | goto out_route; | 317 | goto out_route; |
318 | p->proc_fops = &x25_seq_route_fops; | ||
319 | 318 | ||
320 | p = create_proc_entry("socket", S_IRUGO, x25_proc_dir); | 319 | p = proc_create("socket", S_IRUGO, x25_proc_dir, &x25_seq_socket_fops); |
321 | if (!p) | 320 | if (!p) |
322 | goto out_socket; | 321 | goto out_socket; |
323 | p->proc_fops = &x25_seq_socket_fops; | ||
324 | 322 | ||
325 | p = create_proc_entry("forward", S_IRUGO, x25_proc_dir); | 323 | p = proc_create("forward", S_IRUGO, x25_proc_dir, |
324 | &x25_seq_forward_fops); | ||
326 | if (!p) | 325 | if (!p) |
327 | goto out_forward; | 326 | goto out_forward; |
328 | p->proc_fops = &x25_seq_forward_fops; | ||
329 | rc = 0; | 327 | rc = 0; |
330 | 328 | ||
331 | out: | 329 | out: |