diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-04 13:25:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-04 13:25:19 -0400 |
commit | 936ef1d48ac9a9fc90746bacd93624969711775a (patch) | |
tree | 312bb8643445c80426ae7fa299903e322dc06b2d | |
parent | 0de2a93e80917c70716c20b8b6a75e5350da3f71 (diff) | |
parent | d1a649838802edd94b6335834919463c6ae61f40 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[DECNET]: Fix level1 router hello
[TCP]: Fix sock_orphan dead lock
[ROSE]: Eleminate HZ from ROSE kernel interfaces
[NETROM]: Eleminate HZ from NET/ROM kernel interfaces
[AX.25]: Eleminate HZ from AX.25 kernel interfaces
[ROSE]: Fix routing table locking in rose_remove_neigh.
[AX.25]: Move AX.25 symbol exports
[HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
[AX25, ROSE]: Remove useless SET_MODULE_OWNER calls.
[AX.25]: Spelling fix
[ROSE]: Remove useless prototype for rose_remove_neigh().
[NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat layer
[NETFILTER]: H.323 helper: Change author's email address
[NETFILTER]: NAT: silence unused variable warnings with CONFIG_XFRM=n
[NETFILTER]: H.323 helper: fix use of uninitialized data
[NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len
30 files changed, 145 insertions, 117 deletions
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 79a8fbcf5f93..0d5fccc984bb 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -582,7 +582,6 @@ static int __init setup_adapter(int card_base, int type, int n) | |||
582 | INIT_WORK(&priv->rx_work, rx_bh, priv); | 582 | INIT_WORK(&priv->rx_work, rx_bh, priv); |
583 | dev->priv = priv; | 583 | dev->priv = priv; |
584 | sprintf(dev->name, "dmascc%i", 2 * n + i); | 584 | sprintf(dev->name, "dmascc%i", 2 * n + i); |
585 | SET_MODULE_OWNER(dev); | ||
586 | dev->base_addr = card_base; | 585 | dev->base_addr = card_base; |
587 | dev->irq = irq; | 586 | dev->irq = irq; |
588 | dev->open = scc_open; | 587 | dev->open = scc_open; |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 6ace0e914fd1..5927784df3f9 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -1550,7 +1550,6 @@ static unsigned char ax25_nocall[AX25_ADDR_LEN] = | |||
1550 | 1550 | ||
1551 | static void scc_net_setup(struct net_device *dev) | 1551 | static void scc_net_setup(struct net_device *dev) |
1552 | { | 1552 | { |
1553 | SET_MODULE_OWNER(dev); | ||
1554 | dev->tx_queue_len = 16; /* should be enough... */ | 1553 | dev->tx_queue_len = 16; /* should be enough... */ |
1555 | 1554 | ||
1556 | dev->open = scc_net_open; | 1555 | dev->open = scc_net_open; |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index fe22479eb202..b49884048caa 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -1098,7 +1098,6 @@ static void yam_setup(struct net_device *dev) | |||
1098 | 1098 | ||
1099 | dev->base_addr = yp->iobase; | 1099 | dev->base_addr = yp->iobase; |
1100 | dev->irq = yp->irq; | 1100 | dev->irq = yp->irq; |
1101 | SET_MODULE_OWNER(dev); | ||
1102 | 1101 | ||
1103 | dev->open = yam_open; | 1102 | dev->open = yam_open; |
1104 | dev->stop = yam_close; | 1103 | dev->stop = yam_close; |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h index 0bd828081c0c..c6e9a0b6d30b 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 | 2 | * ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323 |
3 | * conntrack/NAT module. | 3 | * conntrack/NAT module. |
4 | * | 4 | * |
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com> | 5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> |
6 | * | 6 | * |
7 | * This source code is licensed under General Public License version 2. | 7 | * This source code is licensed under General Public License version 2. |
8 | * | 8 | * |
diff --git a/include/net/ax25.h b/include/net/ax25.h index d052b221dbcd..5bd997487054 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -145,14 +145,14 @@ enum { | |||
145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ | 145 | #define AX25_DEF_CONMODE 2 /* Connected mode allowed */ |
146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ | 146 | #define AX25_DEF_WINDOW 2 /* Window=2 */ |
147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ | 147 | #define AX25_DEF_EWINDOW 32 /* Module-128 Window=32 */ |
148 | #define AX25_DEF_T1 (10 * HZ) /* T1=10s */ | 148 | #define AX25_DEF_T1 10000 /* T1=10s */ |
149 | #define AX25_DEF_T2 (3 * HZ) /* T2=3s */ | 149 | #define AX25_DEF_T2 3000 /* T2=3s */ |
150 | #define AX25_DEF_T3 (300 * HZ) /* T3=300s */ | 150 | #define AX25_DEF_T3 300000 /* T3=300s */ |
151 | #define AX25_DEF_N2 10 /* N2=10 */ | 151 | #define AX25_DEF_N2 10 /* N2=10 */ |
152 | #define AX25_DEF_IDLE (0 * 60 * HZ) /* Idle=None */ | 152 | #define AX25_DEF_IDLE 0 /* Idle=None */ |
153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ | 153 | #define AX25_DEF_PACLEN 256 /* Paclen=256 */ |
154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ | 154 | #define AX25_DEF_PROTOCOL AX25_PROTO_STD_SIMPLEX /* Standard AX.25 */ |
155 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ | 155 | #define AX25_DEF_DS_TIMEOUT 180000 /* DAMA timeout 3 minutes */ |
156 | 156 | ||
157 | typedef struct ax25_uid_assoc { | 157 | typedef struct ax25_uid_assoc { |
158 | struct hlist_node uid_node; | 158 | struct hlist_node uid_node; |
diff --git a/include/net/netrom.h b/include/net/netrom.h index a5ee53bce62f..e0ca112024a3 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -42,11 +42,11 @@ enum { | |||
42 | #define NR_COND_PEER_RX_BUSY 0x04 | 42 | #define NR_COND_PEER_RX_BUSY 0x04 |
43 | #define NR_COND_OWN_RX_BUSY 0x08 | 43 | #define NR_COND_OWN_RX_BUSY 0x08 |
44 | 44 | ||
45 | #define NR_DEFAULT_T1 (120 * HZ) /* Outstanding frames - 120 seconds */ | 45 | #define NR_DEFAULT_T1 120000 /* Outstanding frames - 120 seconds */ |
46 | #define NR_DEFAULT_T2 (5 * HZ) /* Response delay - 5 seconds */ | 46 | #define NR_DEFAULT_T2 5000 /* Response delay - 5 seconds */ |
47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ | 47 | #define NR_DEFAULT_N2 3 /* Number of Retries - 3 */ |
48 | #define NR_DEFAULT_T4 (180 * HZ) /* Busy Delay - 180 seconds */ | 48 | #define NR_DEFAULT_T4 180000 /* Busy Delay - 180 seconds */ |
49 | #define NR_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 49 | #define NR_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ | 50 | #define NR_DEFAULT_WINDOW 4 /* Default Window Size - 4 */ |
51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ | 51 | #define NR_DEFAULT_OBS 6 /* Default Obsolescence Count - 6 */ |
52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ | 52 | #define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality - 10 */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 3249b979605a..012b09ed2401 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -49,14 +49,14 @@ enum { | |||
49 | ROSE_STATE_5 /* Deferred Call Acceptance */ | 49 | ROSE_STATE_5 /* Deferred Call Acceptance */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define ROSE_DEFAULT_T0 (180 * HZ) /* Default T10 T20 value */ | 52 | #define ROSE_DEFAULT_T0 180000 /* Default T10 T20 value */ |
53 | #define ROSE_DEFAULT_T1 (200 * HZ) /* Default T11 T21 value */ | 53 | #define ROSE_DEFAULT_T1 200000 /* Default T11 T21 value */ |
54 | #define ROSE_DEFAULT_T2 (180 * HZ) /* Default T12 T22 value */ | 54 | #define ROSE_DEFAULT_T2 180000 /* Default T12 T22 value */ |
55 | #define ROSE_DEFAULT_T3 (180 * HZ) /* Default T13 T23 value */ | 55 | #define ROSE_DEFAULT_T3 180000 /* Default T13 T23 value */ |
56 | #define ROSE_DEFAULT_HB (5 * HZ) /* Default Holdback value */ | 56 | #define ROSE_DEFAULT_HB 5000 /* Default Holdback value */ |
57 | #define ROSE_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */ | 57 | #define ROSE_DEFAULT_IDLE 0 /* No Activity Timeout - none */ |
58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ | 58 | #define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */ |
59 | #define ROSE_DEFAULT_FAIL_TIMEOUT (120 * HZ) /* Time until link considered usable */ | 59 | #define ROSE_DEFAULT_FAIL_TIMEOUT 120000 /* Time until link considered usable */ |
60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ | 60 | #define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */ |
61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ | 61 | #define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */ |
62 | 62 | ||
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index dbf9b47681f7..a2e0dd047e9f 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -228,6 +228,8 @@ ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr, | |||
228 | return NULL; | 228 | return NULL; |
229 | } | 229 | } |
230 | 230 | ||
231 | EXPORT_SYMBOL(ax25_find_cb); | ||
232 | |||
231 | void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) | 233 | void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) |
232 | { | 234 | { |
233 | ax25_cb *s; | 235 | ax25_cb *s; |
@@ -424,6 +426,26 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg) | |||
424 | return 0; | 426 | return 0; |
425 | } | 427 | } |
426 | 428 | ||
429 | static void ax25_fillin_cb_from_dev(ax25_cb *ax25, ax25_dev *ax25_dev) | ||
430 | { | ||
431 | ax25->rtt = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]) / 2; | ||
432 | ax25->t1 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]); | ||
433 | ax25->t2 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T2]); | ||
434 | ax25->t3 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T3]); | ||
435 | ax25->n2 = ax25_dev->values[AX25_VALUES_N2]; | ||
436 | ax25->paclen = ax25_dev->values[AX25_VALUES_PACLEN]; | ||
437 | ax25->idle = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_IDLE]); | ||
438 | ax25->backoff = ax25_dev->values[AX25_VALUES_BACKOFF]; | ||
439 | |||
440 | if (ax25_dev->values[AX25_VALUES_AXDEFMODE]) { | ||
441 | ax25->modulus = AX25_EMODULUS; | ||
442 | ax25->window = ax25_dev->values[AX25_VALUES_EWINDOW]; | ||
443 | } else { | ||
444 | ax25->modulus = AX25_MODULUS; | ||
445 | ax25->window = ax25_dev->values[AX25_VALUES_WINDOW]; | ||
446 | } | ||
447 | } | ||
448 | |||
427 | /* | 449 | /* |
428 | * Fill in a created AX.25 created control block with the default | 450 | * Fill in a created AX.25 created control block with the default |
429 | * values for a particular device. | 451 | * values for a particular device. |
@@ -433,39 +455,28 @@ void ax25_fillin_cb(ax25_cb *ax25, ax25_dev *ax25_dev) | |||
433 | ax25->ax25_dev = ax25_dev; | 455 | ax25->ax25_dev = ax25_dev; |
434 | 456 | ||
435 | if (ax25->ax25_dev != NULL) { | 457 | if (ax25->ax25_dev != NULL) { |
436 | ax25->rtt = ax25_dev->values[AX25_VALUES_T1] / 2; | 458 | ax25_fillin_cb_from_dev(ax25, ax25_dev); |
437 | ax25->t1 = ax25_dev->values[AX25_VALUES_T1]; | 459 | return; |
438 | ax25->t2 = ax25_dev->values[AX25_VALUES_T2]; | 460 | } |
439 | ax25->t3 = ax25_dev->values[AX25_VALUES_T3]; | 461 | |
440 | ax25->n2 = ax25_dev->values[AX25_VALUES_N2]; | 462 | /* |
441 | ax25->paclen = ax25_dev->values[AX25_VALUES_PACLEN]; | 463 | * No device, use kernel / AX.25 spec default values |
442 | ax25->idle = ax25_dev->values[AX25_VALUES_IDLE]; | 464 | */ |
443 | ax25->backoff = ax25_dev->values[AX25_VALUES_BACKOFF]; | 465 | ax25->rtt = msecs_to_jiffies(AX25_DEF_T1) / 2; |
444 | 466 | ax25->t1 = msecs_to_jiffies(AX25_DEF_T1); | |
445 | if (ax25_dev->values[AX25_VALUES_AXDEFMODE]) { | 467 | ax25->t2 = msecs_to_jiffies(AX25_DEF_T2); |
446 | ax25->modulus = AX25_EMODULUS; | 468 | ax25->t3 = msecs_to_jiffies(AX25_DEF_T3); |
447 | ax25->window = ax25_dev->values[AX25_VALUES_EWINDOW]; | 469 | ax25->n2 = AX25_DEF_N2; |
448 | } else { | 470 | ax25->paclen = AX25_DEF_PACLEN; |
449 | ax25->modulus = AX25_MODULUS; | 471 | ax25->idle = msecs_to_jiffies(AX25_DEF_IDLE); |
450 | ax25->window = ax25_dev->values[AX25_VALUES_WINDOW]; | 472 | ax25->backoff = AX25_DEF_BACKOFF; |
451 | } | 473 | |
474 | if (AX25_DEF_AXDEFMODE) { | ||
475 | ax25->modulus = AX25_EMODULUS; | ||
476 | ax25->window = AX25_DEF_EWINDOW; | ||
452 | } else { | 477 | } else { |
453 | ax25->rtt = AX25_DEF_T1 / 2; | 478 | ax25->modulus = AX25_MODULUS; |
454 | ax25->t1 = AX25_DEF_T1; | 479 | ax25->window = AX25_DEF_WINDOW; |
455 | ax25->t2 = AX25_DEF_T2; | ||
456 | ax25->t3 = AX25_DEF_T3; | ||
457 | ax25->n2 = AX25_DEF_N2; | ||
458 | ax25->paclen = AX25_DEF_PACLEN; | ||
459 | ax25->idle = AX25_DEF_IDLE; | ||
460 | ax25->backoff = AX25_DEF_BACKOFF; | ||
461 | |||
462 | if (AX25_DEF_AXDEFMODE) { | ||
463 | ax25->modulus = AX25_EMODULUS; | ||
464 | ax25->window = AX25_DEF_EWINDOW; | ||
465 | } else { | ||
466 | ax25->modulus = AX25_MODULUS; | ||
467 | ax25->window = AX25_DEF_WINDOW; | ||
468 | } | ||
469 | } | 480 | } |
470 | } | 481 | } |
471 | 482 | ||
@@ -1979,24 +1990,6 @@ static struct notifier_block ax25_dev_notifier = { | |||
1979 | .notifier_call =ax25_device_event, | 1990 | .notifier_call =ax25_device_event, |
1980 | }; | 1991 | }; |
1981 | 1992 | ||
1982 | EXPORT_SYMBOL(ax25_hard_header); | ||
1983 | EXPORT_SYMBOL(ax25_rebuild_header); | ||
1984 | EXPORT_SYMBOL(ax25_findbyuid); | ||
1985 | EXPORT_SYMBOL(ax25_find_cb); | ||
1986 | EXPORT_SYMBOL(ax25_linkfail_register); | ||
1987 | EXPORT_SYMBOL(ax25_linkfail_release); | ||
1988 | EXPORT_SYMBOL(ax25_listen_register); | ||
1989 | EXPORT_SYMBOL(ax25_listen_release); | ||
1990 | EXPORT_SYMBOL(ax25_protocol_register); | ||
1991 | EXPORT_SYMBOL(ax25_protocol_release); | ||
1992 | EXPORT_SYMBOL(ax25_send_frame); | ||
1993 | EXPORT_SYMBOL(ax25_uid_policy); | ||
1994 | EXPORT_SYMBOL(ax25cmp); | ||
1995 | EXPORT_SYMBOL(ax2asc); | ||
1996 | EXPORT_SYMBOL(asc2ax); | ||
1997 | EXPORT_SYMBOL(null_ax25_address); | ||
1998 | EXPORT_SYMBOL(ax25_display_timer); | ||
1999 | |||
2000 | static int __init ax25_init(void) | 1993 | static int __init ax25_init(void) |
2001 | { | 1994 | { |
2002 | int rc = proto_register(&ax25_proto, 0); | 1995 | int rc = proto_register(&ax25_proto, 0); |
diff --git a/net/ax25/ax25_addr.c b/net/ax25/ax25_addr.c index 0164a155b8c4..5f0896ad0042 100644 --- a/net/ax25/ax25_addr.c +++ b/net/ax25/ax25_addr.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | ||
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
15 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
@@ -33,6 +34,8 @@ | |||
33 | */ | 34 | */ |
34 | ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}}; | 35 | ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}}; |
35 | 36 | ||
37 | EXPORT_SYMBOL(null_ax25_address); | ||
38 | |||
36 | /* | 39 | /* |
37 | * ax25 -> ascii conversion | 40 | * ax25 -> ascii conversion |
38 | */ | 41 | */ |
@@ -64,6 +67,8 @@ char *ax2asc(char *buf, ax25_address *a) | |||
64 | 67 | ||
65 | } | 68 | } |
66 | 69 | ||
70 | EXPORT_SYMBOL(ax2asc); | ||
71 | |||
67 | /* | 72 | /* |
68 | * ascii -> ax25 conversion | 73 | * ascii -> ax25 conversion |
69 | */ | 74 | */ |
@@ -97,6 +102,8 @@ void asc2ax(ax25_address *addr, char *callsign) | |||
97 | addr->ax25_call[6] &= 0x1E; | 102 | addr->ax25_call[6] &= 0x1E; |
98 | } | 103 | } |
99 | 104 | ||
105 | EXPORT_SYMBOL(asc2ax); | ||
106 | |||
100 | /* | 107 | /* |
101 | * Compare two ax.25 addresses | 108 | * Compare two ax.25 addresses |
102 | */ | 109 | */ |
@@ -116,6 +123,8 @@ int ax25cmp(ax25_address *a, ax25_address *b) | |||
116 | return 2; /* Partial match */ | 123 | return 2; /* Partial match */ |
117 | } | 124 | } |
118 | 125 | ||
126 | EXPORT_SYMBOL(ax25cmp); | ||
127 | |||
119 | /* | 128 | /* |
120 | * Compare two AX.25 digipeater paths. | 129 | * Compare two AX.25 digipeater paths. |
121 | */ | 130 | */ |
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c index 061083efc1dc..5961459935eb 100644 --- a/net/ax25/ax25_ds_timer.c +++ b/net/ax25/ax25_ds_timer.c | |||
@@ -61,7 +61,8 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev) | |||
61 | return; | 61 | return; |
62 | 62 | ||
63 | del_timer(&ax25_dev->dama.slave_timer); | 63 | del_timer(&ax25_dev->dama.slave_timer); |
64 | ax25_dev->dama.slave_timeout = ax25_dev->values[AX25_VALUES_DS_TIMEOUT] / 10; | 64 | ax25_dev->dama.slave_timeout = |
65 | msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10; | ||
65 | ax25_ds_add_timer(ax25_dev); | 66 | ax25_ds_add_timer(ax25_dev); |
66 | } | 67 | } |
67 | 68 | ||
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index d68aff100729..3bb152710b77 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/socket.h> | 12 | #include <linux/socket.h> |
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
17 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
@@ -74,6 +75,8 @@ int ax25_protocol_register(unsigned int pid, | |||
74 | return 1; | 75 | return 1; |
75 | } | 76 | } |
76 | 77 | ||
78 | EXPORT_SYMBOL(ax25_protocol_register); | ||
79 | |||
77 | void ax25_protocol_release(unsigned int pid) | 80 | void ax25_protocol_release(unsigned int pid) |
78 | { | 81 | { |
79 | struct protocol_struct *s, *protocol; | 82 | struct protocol_struct *s, *protocol; |
@@ -106,6 +109,8 @@ void ax25_protocol_release(unsigned int pid) | |||
106 | write_unlock(&protocol_list_lock); | 109 | write_unlock(&protocol_list_lock); |
107 | } | 110 | } |
108 | 111 | ||
112 | EXPORT_SYMBOL(ax25_protocol_release); | ||
113 | |||
109 | int ax25_linkfail_register(void (*func)(ax25_cb *, int)) | 114 | int ax25_linkfail_register(void (*func)(ax25_cb *, int)) |
110 | { | 115 | { |
111 | struct linkfail_struct *linkfail; | 116 | struct linkfail_struct *linkfail; |
@@ -123,6 +128,8 @@ int ax25_linkfail_register(void (*func)(ax25_cb *, int)) | |||
123 | return 1; | 128 | return 1; |
124 | } | 129 | } |
125 | 130 | ||
131 | EXPORT_SYMBOL(ax25_linkfail_register); | ||
132 | |||
126 | void ax25_linkfail_release(void (*func)(ax25_cb *, int)) | 133 | void ax25_linkfail_release(void (*func)(ax25_cb *, int)) |
127 | { | 134 | { |
128 | struct linkfail_struct *s, *linkfail; | 135 | struct linkfail_struct *s, *linkfail; |
@@ -155,6 +162,8 @@ void ax25_linkfail_release(void (*func)(ax25_cb *, int)) | |||
155 | spin_unlock_bh(&linkfail_lock); | 162 | spin_unlock_bh(&linkfail_lock); |
156 | } | 163 | } |
157 | 164 | ||
165 | EXPORT_SYMBOL(ax25_linkfail_release); | ||
166 | |||
158 | int ax25_listen_register(ax25_address *callsign, struct net_device *dev) | 167 | int ax25_listen_register(ax25_address *callsign, struct net_device *dev) |
159 | { | 168 | { |
160 | struct listen_struct *listen; | 169 | struct listen_struct *listen; |
@@ -176,6 +185,8 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev) | |||
176 | return 1; | 185 | return 1; |
177 | } | 186 | } |
178 | 187 | ||
188 | EXPORT_SYMBOL(ax25_listen_register); | ||
189 | |||
179 | void ax25_listen_release(ax25_address *callsign, struct net_device *dev) | 190 | void ax25_listen_release(ax25_address *callsign, struct net_device *dev) |
180 | { | 191 | { |
181 | struct listen_struct *s, *listen; | 192 | struct listen_struct *s, *listen; |
@@ -208,6 +219,8 @@ void ax25_listen_release(ax25_address *callsign, struct net_device *dev) | |||
208 | spin_unlock_bh(&listen_lock); | 219 | spin_unlock_bh(&listen_lock); |
209 | } | 220 | } |
210 | 221 | ||
222 | EXPORT_SYMBOL(ax25_listen_release); | ||
223 | |||
211 | int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *) | 224 | int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *) |
212 | { | 225 | { |
213 | int (*res)(struct sk_buff *, ax25_cb *) = NULL; | 226 | int (*res)(struct sk_buff *, ax25_cb *) = NULL; |
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index d643dac3eccc..a0b534f80f17 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/socket.h> | 12 | #include <linux/socket.h> |
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
@@ -221,3 +222,5 @@ int ax25_rebuild_header(struct sk_buff *skb) | |||
221 | 222 | ||
222 | #endif | 223 | #endif |
223 | 224 | ||
225 | EXPORT_SYMBOL(ax25_hard_header); | ||
226 | EXPORT_SYMBOL(ax25_rebuild_header); | ||
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index 5fc048dcd39a..5d99852b239c 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/socket.h> | 14 | #include <linux/socket.h> |
15 | #include <linux/in.h> | 15 | #include <linux/in.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
18 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
@@ -104,6 +105,8 @@ ax25_cb *ax25_send_frame(struct sk_buff *skb, int paclen, ax25_address *src, ax2 | |||
104 | return ax25; /* We had to create it */ | 105 | return ax25; /* We had to create it */ |
105 | } | 106 | } |
106 | 107 | ||
108 | EXPORT_SYMBOL(ax25_send_frame); | ||
109 | |||
107 | /* | 110 | /* |
108 | * All outgoing AX.25 I frames pass via this routine. Therefore this is | 111 | * All outgoing AX.25 I frames pass via this routine. Therefore this is |
109 | * where the fragmentation of frames takes place. If fragment is set to | 112 | * where the fragmentation of frames takes place. If fragment is set to |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index f04f8630fd28..5ac98250797b 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -360,7 +360,7 @@ struct file_operations ax25_route_fops = { | |||
360 | /* | 360 | /* |
361 | * Find AX.25 route | 361 | * Find AX.25 route |
362 | * | 362 | * |
363 | * Only routes with a refernce rout of zero can be destroyed. | 363 | * Only routes with a reference count of zero can be destroyed. |
364 | */ | 364 | */ |
365 | static ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev) | 365 | static ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev) |
366 | { | 366 | { |
diff --git a/net/ax25/ax25_timer.c b/net/ax25/ax25_timer.c index 7a6b50a14554..ec254057f212 100644 --- a/net/ax25/ax25_timer.c +++ b/net/ax25/ax25_timer.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/socket.h> | 18 | #include <linux/socket.h> |
19 | #include <linux/in.h> | 19 | #include <linux/in.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | ||
21 | #include <linux/jiffies.h> | 22 | #include <linux/jiffies.h> |
22 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
@@ -137,6 +138,8 @@ unsigned long ax25_display_timer(struct timer_list *timer) | |||
137 | return timer->expires - jiffies; | 138 | return timer->expires - jiffies; |
138 | } | 139 | } |
139 | 140 | ||
141 | EXPORT_SYMBOL(ax25_display_timer); | ||
142 | |||
140 | static void ax25_heartbeat_expiry(unsigned long param) | 143 | static void ax25_heartbeat_expiry(unsigned long param) |
141 | { | 144 | { |
142 | int proto = AX25_PROTO_STD_SIMPLEX; | 145 | int proto = AX25_PROTO_STD_SIMPLEX; |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index b8b5854bce9a..5e9a81e8b214 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -49,6 +49,8 @@ static DEFINE_RWLOCK(ax25_uid_lock); | |||
49 | 49 | ||
50 | int ax25_uid_policy = 0; | 50 | int ax25_uid_policy = 0; |
51 | 51 | ||
52 | EXPORT_SYMBOL(ax25_uid_policy); | ||
53 | |||
52 | ax25_uid_assoc *ax25_findbyuid(uid_t uid) | 54 | ax25_uid_assoc *ax25_findbyuid(uid_t uid) |
53 | { | 55 | { |
54 | ax25_uid_assoc *ax25_uid, *res = NULL; | 56 | ax25_uid_assoc *ax25_uid, *res = NULL; |
@@ -67,6 +69,8 @@ ax25_uid_assoc *ax25_findbyuid(uid_t uid) | |||
67 | return res; | 69 | return res; |
68 | } | 70 | } |
69 | 71 | ||
72 | EXPORT_SYMBOL(ax25_findbyuid); | ||
73 | |||
70 | int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | 74 | int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) |
71 | { | 75 | { |
72 | ax25_uid_assoc *ax25_uid; | 76 | ax25_uid_assoc *ax25_uid; |
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index 894a22558d9d..bdb64c36df12 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c | |||
@@ -18,14 +18,14 @@ static int min_backoff[1], max_backoff[] = {2}; | |||
18 | static int min_conmode[1], max_conmode[] = {2}; | 18 | static int min_conmode[1], max_conmode[] = {2}; |
19 | static int min_window[] = {1}, max_window[] = {7}; | 19 | static int min_window[] = {1}, max_window[] = {7}; |
20 | static int min_ewindow[] = {1}, max_ewindow[] = {63}; | 20 | static int min_ewindow[] = {1}, max_ewindow[] = {63}; |
21 | static int min_t1[] = {1}, max_t1[] = {30 * HZ}; | 21 | static int min_t1[] = {1}, max_t1[] = {30000}; |
22 | static int min_t2[] = {1}, max_t2[] = {20 * HZ}; | 22 | static int min_t2[] = {1}, max_t2[] = {20000}; |
23 | static int min_t3[1], max_t3[] = {3600 * HZ}; | 23 | static int min_t3[1], max_t3[] = {3600000}; |
24 | static int min_idle[1], max_idle[] = {65535 * HZ}; | 24 | static int min_idle[1], max_idle[] = {65535000}; |
25 | static int min_n2[] = {1}, max_n2[] = {31}; | 25 | static int min_n2[] = {1}, max_n2[] = {31}; |
26 | static int min_paclen[] = {1}, max_paclen[] = {512}; | 26 | static int min_paclen[] = {1}, max_paclen[] = {512}; |
27 | static int min_proto[1], max_proto[] = { AX25_PROTO_MAX }; | 27 | static int min_proto[1], max_proto[] = { AX25_PROTO_MAX }; |
28 | static int min_ds_timeout[1], max_ds_timeout[] = {65535 * HZ}; | 28 | static int min_ds_timeout[1], max_ds_timeout[] = {65535000}; |
29 | 29 | ||
30 | static struct ctl_table_header *ax25_table_header; | 30 | static struct ctl_table_header *ax25_table_header; |
31 | 31 | ||
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 7c8692c26bfe..66e230c3b328 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -493,7 +493,6 @@ struct elist_cb_state { | |||
493 | static void neigh_elist_cb(struct neighbour *neigh, void *_info) | 493 | static void neigh_elist_cb(struct neighbour *neigh, void *_info) |
494 | { | 494 | { |
495 | struct elist_cb_state *s = _info; | 495 | struct elist_cb_state *s = _info; |
496 | struct dn_dev *dn_db; | ||
497 | struct dn_neigh *dn; | 496 | struct dn_neigh *dn; |
498 | 497 | ||
499 | if (neigh->dev != s->dev) | 498 | if (neigh->dev != s->dev) |
@@ -503,10 +502,6 @@ static void neigh_elist_cb(struct neighbour *neigh, void *_info) | |||
503 | if (!(dn->flags & (DN_NDFLAG_R1|DN_NDFLAG_R2))) | 502 | if (!(dn->flags & (DN_NDFLAG_R1|DN_NDFLAG_R2))) |
504 | return; | 503 | return; |
505 | 504 | ||
506 | dn_db = (struct dn_dev *) s->dev->dn_ptr; | ||
507 | if (dn_db->parms.forwarding == 1 && (dn->flags & DN_NDFLAG_R2)) | ||
508 | return; | ||
509 | |||
510 | if (s->t == s->n) | 505 | if (s->t == s->n) |
511 | s->rs = dn_find_slot(s->ptr, s->n, dn->priority); | 506 | s->rs = dn_find_slot(s->ptr, s->n, dn->priority); |
512 | else | 507 | else |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index 2c2fb700d835..518f581d39ec 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c | |||
@@ -162,6 +162,8 @@ static int get_tpkt_data(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
162 | 162 | ||
163 | /* Validate TPKT length */ | 163 | /* Validate TPKT length */ |
164 | tpktlen = tpkt[2] * 256 + tpkt[3]; | 164 | tpktlen = tpkt[2] * 256 + tpkt[3]; |
165 | if (tpktlen < 4) | ||
166 | goto clear_out; | ||
165 | if (tpktlen > tcpdatalen) { | 167 | if (tpktlen > tcpdatalen) { |
166 | if (tcpdatalen == 4) { /* Separate TPKT header */ | 168 | if (tcpdatalen == 4) { /* Separate TPKT header */ |
167 | /* Netmeeting sends TPKT header and data separately */ | 169 | /* Netmeeting sends TPKT header and data separately */ |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c index 48078002e450..355a53a5b6cd 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * ip_conntrack_helper_h323_asn1.c - BER and PER decoding library for H.323 | 2 | * ip_conntrack_helper_h323_asn1.c - BER and PER decoding library for H.323 |
3 | * conntrack/NAT module. | 3 | * conntrack/NAT module. |
4 | * | 4 | * |
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@hotmail.com> | 5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> |
6 | * | 6 | * |
7 | * This source code is licensed under General Public License version 2. | 7 | * This source code is licensed under General Public License version 2. |
8 | * | 8 | * |
@@ -703,6 +703,10 @@ int decode_choice(bitstr_t * bs, field_t * f, char *base, int level) | |||
703 | type = get_bits(bs, f->sz); | 703 | type = get_bits(bs, f->sz); |
704 | } | 704 | } |
705 | 705 | ||
706 | /* Write Type */ | ||
707 | if (base) | ||
708 | *(unsigned *) base = type; | ||
709 | |||
706 | /* Check Range */ | 710 | /* Check Range */ |
707 | if (type >= f->ub) { /* Newer version? */ | 711 | if (type >= f->ub) { /* Newer version? */ |
708 | BYTE_ALIGN(bs); | 712 | BYTE_ALIGN(bs); |
@@ -712,10 +716,6 @@ int decode_choice(bitstr_t * bs, field_t * f, char *base, int level) | |||
712 | return H323_ERROR_NONE; | 716 | return H323_ERROR_NONE; |
713 | } | 717 | } |
714 | 718 | ||
715 | /* Write Type */ | ||
716 | if (base) | ||
717 | *(unsigned *) base = type; | ||
718 | |||
719 | /* Transfer to son level */ | 719 | /* Transfer to son level */ |
720 | son = &f->fields[type]; | 720 | son = &f->fields[type]; |
721 | if (son->attr & STOP) { | 721 | if (son->attr & STOP) { |
diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c index 8f760b28617e..67e676783da9 100644 --- a/net/ipv4/netfilter/ip_nat_standalone.c +++ b/net/ipv4/netfilter/ip_nat_standalone.c | |||
@@ -219,8 +219,10 @@ ip_nat_out(unsigned int hooknum, | |||
219 | const struct net_device *out, | 219 | const struct net_device *out, |
220 | int (*okfn)(struct sk_buff *)) | 220 | int (*okfn)(struct sk_buff *)) |
221 | { | 221 | { |
222 | #ifdef CONFIG_XFRM | ||
222 | struct ip_conntrack *ct; | 223 | struct ip_conntrack *ct; |
223 | enum ip_conntrack_info ctinfo; | 224 | enum ip_conntrack_info ctinfo; |
225 | #endif | ||
224 | unsigned int ret; | 226 | unsigned int ret; |
225 | 227 | ||
226 | /* root is playing with raw sockets. */ | 228 | /* root is playing with raw sockets. */ |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 6d1c11563943..cee3397ec277 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -1441,7 +1441,7 @@ static int compat_copy_entry_to_user(struct ipt_entry *e, | |||
1441 | ret = -EFAULT; | 1441 | ret = -EFAULT; |
1442 | origsize = *size; | 1442 | origsize = *size; |
1443 | ce = (struct compat_ipt_entry __user *)*dstptr; | 1443 | ce = (struct compat_ipt_entry __user *)*dstptr; |
1444 | if (__copy_to_user(ce, e, sizeof(struct ipt_entry))) | 1444 | if (copy_to_user(ce, e, sizeof(struct ipt_entry))) |
1445 | goto out; | 1445 | goto out; |
1446 | 1446 | ||
1447 | *dstptr += sizeof(struct compat_ipt_entry); | 1447 | *dstptr += sizeof(struct compat_ipt_entry); |
@@ -1459,9 +1459,9 @@ static int compat_copy_entry_to_user(struct ipt_entry *e, | |||
1459 | goto out; | 1459 | goto out; |
1460 | ret = -EFAULT; | 1460 | ret = -EFAULT; |
1461 | next_offset = e->next_offset - (origsize - *size); | 1461 | next_offset = e->next_offset - (origsize - *size); |
1462 | if (__put_user(target_offset, &ce->target_offset)) | 1462 | if (put_user(target_offset, &ce->target_offset)) |
1463 | goto out; | 1463 | goto out; |
1464 | if (__put_user(next_offset, &ce->next_offset)) | 1464 | if (put_user(next_offset, &ce->next_offset)) |
1465 | goto out; | 1465 | goto out; |
1466 | return 0; | 1466 | return 0; |
1467 | out: | 1467 | out: |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 87f68e787d0c..e2b7b8055037 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1468,6 +1468,7 @@ void tcp_close(struct sock *sk, long timeout) | |||
1468 | { | 1468 | { |
1469 | struct sk_buff *skb; | 1469 | struct sk_buff *skb; |
1470 | int data_was_unread = 0; | 1470 | int data_was_unread = 0; |
1471 | int state; | ||
1471 | 1472 | ||
1472 | lock_sock(sk); | 1473 | lock_sock(sk); |
1473 | sk->sk_shutdown = SHUTDOWN_MASK; | 1474 | sk->sk_shutdown = SHUTDOWN_MASK; |
@@ -1544,6 +1545,11 @@ void tcp_close(struct sock *sk, long timeout) | |||
1544 | sk_stream_wait_close(sk, timeout); | 1545 | sk_stream_wait_close(sk, timeout); |
1545 | 1546 | ||
1546 | adjudge_to_death: | 1547 | adjudge_to_death: |
1548 | state = sk->sk_state; | ||
1549 | sock_hold(sk); | ||
1550 | sock_orphan(sk); | ||
1551 | atomic_inc(sk->sk_prot->orphan_count); | ||
1552 | |||
1547 | /* It is the last release_sock in its life. It will remove backlog. */ | 1553 | /* It is the last release_sock in its life. It will remove backlog. */ |
1548 | release_sock(sk); | 1554 | release_sock(sk); |
1549 | 1555 | ||
@@ -1555,8 +1561,9 @@ adjudge_to_death: | |||
1555 | bh_lock_sock(sk); | 1561 | bh_lock_sock(sk); |
1556 | BUG_TRAP(!sock_owned_by_user(sk)); | 1562 | BUG_TRAP(!sock_owned_by_user(sk)); |
1557 | 1563 | ||
1558 | sock_hold(sk); | 1564 | /* Have we already been destroyed by a softirq or backlog? */ |
1559 | sock_orphan(sk); | 1565 | if (state != TCP_CLOSE && sk->sk_state == TCP_CLOSE) |
1566 | goto out; | ||
1560 | 1567 | ||
1561 | /* This is a (useful) BSD violating of the RFC. There is a | 1568 | /* This is a (useful) BSD violating of the RFC. There is a |
1562 | * problem with TCP as specified in that the other end could | 1569 | * problem with TCP as specified in that the other end could |
@@ -1584,7 +1591,6 @@ adjudge_to_death: | |||
1584 | if (tmo > TCP_TIMEWAIT_LEN) { | 1591 | if (tmo > TCP_TIMEWAIT_LEN) { |
1585 | inet_csk_reset_keepalive_timer(sk, tcp_fin_time(sk)); | 1592 | inet_csk_reset_keepalive_timer(sk, tcp_fin_time(sk)); |
1586 | } else { | 1593 | } else { |
1587 | atomic_inc(sk->sk_prot->orphan_count); | ||
1588 | tcp_time_wait(sk, TCP_FIN_WAIT2, tmo); | 1594 | tcp_time_wait(sk, TCP_FIN_WAIT2, tmo); |
1589 | goto out; | 1595 | goto out; |
1590 | } | 1596 | } |
@@ -1603,7 +1609,6 @@ adjudge_to_death: | |||
1603 | NET_INC_STATS_BH(LINUX_MIB_TCPABORTONMEMORY); | 1609 | NET_INC_STATS_BH(LINUX_MIB_TCPABORTONMEMORY); |
1604 | } | 1610 | } |
1605 | } | 1611 | } |
1606 | atomic_inc(sk->sk_prot->orphan_count); | ||
1607 | 1612 | ||
1608 | if (sk->sk_state == TCP_CLOSE) | 1613 | if (sk->sk_state == TCP_CLOSE) |
1609 | inet_csk_destroy_sock(sk); | 1614 | inet_csk_destroy_sock(sk); |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 17abf60f9570..99293c63ff73 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -289,7 +289,7 @@ int xt_compat_match(void *match, void **dstptr, int *size, int convert) | |||
289 | case COMPAT_TO_USER: | 289 | case COMPAT_TO_USER: |
290 | pm = (struct xt_entry_match *)match; | 290 | pm = (struct xt_entry_match *)match; |
291 | msize = pm->u.user.match_size; | 291 | msize = pm->u.user.match_size; |
292 | if (__copy_to_user(*dstptr, pm, msize)) { | 292 | if (copy_to_user(*dstptr, pm, msize)) { |
293 | ret = -EFAULT; | 293 | ret = -EFAULT; |
294 | break; | 294 | break; |
295 | } | 295 | } |
@@ -366,7 +366,7 @@ int xt_compat_target(void *target, void **dstptr, int *size, int convert) | |||
366 | case COMPAT_TO_USER: | 366 | case COMPAT_TO_USER: |
367 | pt = (struct xt_entry_target *)target; | 367 | pt = (struct xt_entry_target *)target; |
368 | tsize = pt->u.user.target_size; | 368 | tsize = pt->u.user.target_size; |
369 | if (__copy_to_user(*dstptr, pt, tsize)) { | 369 | if (copy_to_user(*dstptr, pt, tsize)) { |
370 | ret = -EFAULT; | 370 | ret = -EFAULT; |
371 | break; | 371 | break; |
372 | } | 372 | } |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index d44981f5a619..ecd288beca7c 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -425,11 +425,16 @@ static int nr_create(struct socket *sock, int protocol) | |||
425 | 425 | ||
426 | nr_init_timers(sk); | 426 | nr_init_timers(sk); |
427 | 427 | ||
428 | nr->t1 = sysctl_netrom_transport_timeout; | 428 | nr->t1 = |
429 | nr->t2 = sysctl_netrom_transport_acknowledge_delay; | 429 | msecs_to_jiffies(sysctl_netrom_transport_timeout); |
430 | nr->n2 = sysctl_netrom_transport_maximum_tries; | 430 | nr->t2 = |
431 | nr->t4 = sysctl_netrom_transport_busy_delay; | 431 | msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay); |
432 | nr->idle = sysctl_netrom_transport_no_activity_timeout; | 432 | nr->n2 = |
433 | msecs_to_jiffies(sysctl_netrom_transport_maximum_tries); | ||
434 | nr->t4 = | ||
435 | msecs_to_jiffies(sysctl_netrom_transport_busy_delay); | ||
436 | nr->idle = | ||
437 | msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout); | ||
433 | nr->window = sysctl_netrom_transport_requested_window_size; | 438 | nr->window = sysctl_netrom_transport_requested_window_size; |
434 | 439 | ||
435 | nr->bpqext = 1; | 440 | nr->bpqext = 1; |
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 509afddae569..621e5586ab03 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c | |||
@@ -185,7 +185,6 @@ static struct net_device_stats *nr_get_stats(struct net_device *dev) | |||
185 | 185 | ||
186 | void nr_setup(struct net_device *dev) | 186 | void nr_setup(struct net_device *dev) |
187 | { | 187 | { |
188 | SET_MODULE_OWNER(dev); | ||
189 | dev->mtu = NR_MAX_PACKET_SIZE; | 188 | dev->mtu = NR_MAX_PACKET_SIZE; |
190 | dev->hard_start_xmit = nr_xmit; | 189 | dev->hard_start_xmit = nr_xmit; |
191 | dev->open = nr_open; | 190 | dev->open = nr_open; |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index ea65396d1619..ef4538ac84f0 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -518,11 +518,11 @@ static int rose_create(struct socket *sock, int protocol) | |||
518 | init_timer(&rose->timer); | 518 | init_timer(&rose->timer); |
519 | init_timer(&rose->idletimer); | 519 | init_timer(&rose->idletimer); |
520 | 520 | ||
521 | rose->t1 = sysctl_rose_call_request_timeout; | 521 | rose->t1 = msecs_to_jiffies(sysctl_rose_call_request_timeout); |
522 | rose->t2 = sysctl_rose_reset_request_timeout; | 522 | rose->t2 = msecs_to_jiffies(sysctl_rose_reset_request_timeout); |
523 | rose->t3 = sysctl_rose_clear_request_timeout; | 523 | rose->t3 = msecs_to_jiffies(sysctl_rose_clear_request_timeout); |
524 | rose->hb = sysctl_rose_ack_hold_back_timeout; | 524 | rose->hb = msecs_to_jiffies(sysctl_rose_ack_hold_back_timeout); |
525 | rose->idle = sysctl_rose_no_activity_timeout; | 525 | rose->idle = msecs_to_jiffies(sysctl_rose_no_activity_timeout); |
526 | 526 | ||
527 | rose->state = ROSE_STATE_0; | 527 | rose->state = ROSE_STATE_0; |
528 | 528 | ||
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index d297af737d10..2a1bf8e119e5 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c | |||
@@ -135,7 +135,6 @@ static struct net_device_stats *rose_get_stats(struct net_device *dev) | |||
135 | 135 | ||
136 | void rose_setup(struct net_device *dev) | 136 | void rose_setup(struct net_device *dev) |
137 | { | 137 | { |
138 | SET_MODULE_OWNER(dev); | ||
139 | dev->mtu = ROSE_MAX_PACKET_SIZE - 2; | 138 | dev->mtu = ROSE_MAX_PACKET_SIZE - 2; |
140 | dev->hard_start_xmit = rose_xmit; | 139 | dev->hard_start_xmit = rose_xmit; |
141 | dev->open = rose_open; | 140 | dev->open = rose_open; |
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index 09e9e9d04d92..bd86a63960ce 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -40,7 +40,8 @@ void rose_start_ftimer(struct rose_neigh *neigh) | |||
40 | 40 | ||
41 | neigh->ftimer.data = (unsigned long)neigh; | 41 | neigh->ftimer.data = (unsigned long)neigh; |
42 | neigh->ftimer.function = &rose_ftimer_expiry; | 42 | neigh->ftimer.function = &rose_ftimer_expiry; |
43 | neigh->ftimer.expires = jiffies + sysctl_rose_link_fail_timeout; | 43 | neigh->ftimer.expires = |
44 | jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); | ||
44 | 45 | ||
45 | add_timer(&neigh->ftimer); | 46 | add_timer(&neigh->ftimer); |
46 | } | 47 | } |
@@ -51,7 +52,8 @@ static void rose_start_t0timer(struct rose_neigh *neigh) | |||
51 | 52 | ||
52 | neigh->t0timer.data = (unsigned long)neigh; | 53 | neigh->t0timer.data = (unsigned long)neigh; |
53 | neigh->t0timer.function = &rose_t0timer_expiry; | 54 | neigh->t0timer.function = &rose_t0timer_expiry; |
54 | neigh->t0timer.expires = jiffies + sysctl_rose_restart_request_timeout; | 55 | neigh->t0timer.expires = |
56 | jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); | ||
55 | 57 | ||
56 | add_timer(&neigh->t0timer); | 58 | add_timer(&neigh->t0timer); |
57 | } | 59 | } |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 8631b65a7312..a22542fa1bc8 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -48,8 +48,6 @@ static DEFINE_SPINLOCK(rose_route_list_lock); | |||
48 | 48 | ||
49 | struct rose_neigh *rose_loopback_neigh; | 49 | struct rose_neigh *rose_loopback_neigh; |
50 | 50 | ||
51 | static void rose_remove_neigh(struct rose_neigh *); | ||
52 | |||
53 | /* | 51 | /* |
54 | * Add a new route to a node, and in the process add the node and the | 52 | * Add a new route to a node, and in the process add the node and the |
55 | * neighbour if it is new. | 53 | * neighbour if it is new. |
@@ -235,11 +233,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
235 | 233 | ||
236 | skb_queue_purge(&rose_neigh->queue); | 234 | skb_queue_purge(&rose_neigh->queue); |
237 | 235 | ||
238 | spin_lock_bh(&rose_neigh_list_lock); | ||
239 | |||
240 | if ((s = rose_neigh_list) == rose_neigh) { | 236 | if ((s = rose_neigh_list) == rose_neigh) { |
241 | rose_neigh_list = rose_neigh->next; | 237 | rose_neigh_list = rose_neigh->next; |
242 | spin_unlock_bh(&rose_neigh_list_lock); | ||
243 | kfree(rose_neigh->digipeat); | 238 | kfree(rose_neigh->digipeat); |
244 | kfree(rose_neigh); | 239 | kfree(rose_neigh); |
245 | return; | 240 | return; |
@@ -248,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
248 | while (s != NULL && s->next != NULL) { | 243 | while (s != NULL && s->next != NULL) { |
249 | if (s->next == rose_neigh) { | 244 | if (s->next == rose_neigh) { |
250 | s->next = rose_neigh->next; | 245 | s->next = rose_neigh->next; |
251 | spin_unlock_bh(&rose_neigh_list_lock); | ||
252 | kfree(rose_neigh->digipeat); | 246 | kfree(rose_neigh->digipeat); |
253 | kfree(rose_neigh); | 247 | kfree(rose_neigh); |
254 | return; | 248 | return; |
@@ -256,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh) | |||
256 | 250 | ||
257 | s = s->next; | 251 | s = s->next; |
258 | } | 252 | } |
259 | spin_unlock_bh(&rose_neigh_list_lock); | ||
260 | } | 253 | } |
261 | 254 | ||
262 | /* | 255 | /* |