diff options
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/af_ax25.c | 4 | ||||
-rw-r--r-- | net/ax25/ax25_ds_timer.c | 2 | ||||
-rw-r--r-- | net/ax25/ax25_route.c | 2 | ||||
-rw-r--r-- | net/ax25/ax25_std_timer.c | 4 | ||||
-rw-r--r-- | net/ax25/ax25_uid.c | 6 |
5 files changed, 12 insertions, 6 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index a028d37ba2e0..1bc0e85f04a5 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -570,7 +570,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, | |||
570 | res = -EINVAL; | 570 | res = -EINVAL; |
571 | break; | 571 | break; |
572 | } | 572 | } |
573 | ax25->rtt = (opt * HZ) / 2; | 573 | ax25->rtt = (opt * HZ) >> 1; |
574 | ax25->t1 = opt * HZ; | 574 | ax25->t1 = opt * HZ; |
575 | break; | 575 | break; |
576 | 576 | ||
@@ -1863,6 +1863,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1863 | #ifdef CONFIG_PROC_FS | 1863 | #ifdef CONFIG_PROC_FS |
1864 | 1864 | ||
1865 | static void *ax25_info_start(struct seq_file *seq, loff_t *pos) | 1865 | static void *ax25_info_start(struct seq_file *seq, loff_t *pos) |
1866 | __acquires(ax25_list_lock) | ||
1866 | { | 1867 | { |
1867 | struct ax25_cb *ax25; | 1868 | struct ax25_cb *ax25; |
1868 | struct hlist_node *node; | 1869 | struct hlist_node *node; |
@@ -1886,6 +1887,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1886 | } | 1887 | } |
1887 | 1888 | ||
1888 | static void ax25_info_stop(struct seq_file *seq, void *v) | 1889 | static void ax25_info_stop(struct seq_file *seq, void *v) |
1890 | __releases(ax25_list_lock) | ||
1889 | { | 1891 | { |
1890 | spin_unlock_bh(&ax25_list_lock); | 1892 | spin_unlock_bh(&ax25_list_lock); |
1891 | } | 1893 | } |
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c index 4f44185955c7..c4e3b025d21c 100644 --- a/net/ax25/ax25_ds_timer.c +++ b/net/ax25/ax25_ds_timer.c | |||
@@ -130,7 +130,7 @@ void ax25_ds_heartbeat_expiry(ax25_cb *ax25) | |||
130 | */ | 130 | */ |
131 | if (sk != NULL) { | 131 | if (sk != NULL) { |
132 | if (atomic_read(&sk->sk_rmem_alloc) < | 132 | if (atomic_read(&sk->sk_rmem_alloc) < |
133 | (sk->sk_rcvbuf / 2) && | 133 | (sk->sk_rcvbuf >> 1) && |
134 | (ax25->condition & AX25_COND_OWN_RX_BUSY)) { | 134 | (ax25->condition & AX25_COND_OWN_RX_BUSY)) { |
135 | ax25->condition &= ~AX25_COND_OWN_RX_BUSY; | 135 | ax25->condition &= ~AX25_COND_OWN_RX_BUSY; |
136 | ax25->condition &= ~AX25_COND_ACK_PENDING; | 136 | ax25->condition &= ~AX25_COND_ACK_PENDING; |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 9ecf6f1df863..38c7f3087ec3 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -249,6 +249,7 @@ int ax25_rt_ioctl(unsigned int cmd, void __user *arg) | |||
249 | #ifdef CONFIG_PROC_FS | 249 | #ifdef CONFIG_PROC_FS |
250 | 250 | ||
251 | static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos) | 251 | static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos) |
252 | __acquires(ax25_route_lock) | ||
252 | { | 253 | { |
253 | struct ax25_route *ax25_rt; | 254 | struct ax25_route *ax25_rt; |
254 | int i = 1; | 255 | int i = 1; |
@@ -274,6 +275,7 @@ static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
274 | } | 275 | } |
275 | 276 | ||
276 | static void ax25_rt_seq_stop(struct seq_file *seq, void *v) | 277 | static void ax25_rt_seq_stop(struct seq_file *seq, void *v) |
278 | __releases(ax25_route_lock) | ||
277 | { | 279 | { |
278 | read_unlock(&ax25_route_lock); | 280 | read_unlock(&ax25_route_lock); |
279 | } | 281 | } |
diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c index f2f6918ac9bb..96e4b9273250 100644 --- a/net/ax25/ax25_std_timer.c +++ b/net/ax25/ax25_std_timer.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | void ax25_std_heartbeat_expiry(ax25_cb *ax25) | 33 | void ax25_std_heartbeat_expiry(ax25_cb *ax25) |
34 | { | 34 | { |
35 | struct sock *sk=ax25->sk; | 35 | struct sock *sk = ax25->sk; |
36 | 36 | ||
37 | if (sk) | 37 | if (sk) |
38 | bh_lock_sock(sk); | 38 | bh_lock_sock(sk); |
@@ -62,7 +62,7 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) | |||
62 | */ | 62 | */ |
63 | if (sk != NULL) { | 63 | if (sk != NULL) { |
64 | if (atomic_read(&sk->sk_rmem_alloc) < | 64 | if (atomic_read(&sk->sk_rmem_alloc) < |
65 | (sk->sk_rcvbuf / 2) && | 65 | (sk->sk_rcvbuf >> 1) && |
66 | (ax25->condition & AX25_COND_OWN_RX_BUSY)) { | 66 | (ax25->condition & AX25_COND_OWN_RX_BUSY)) { |
67 | ax25->condition &= ~AX25_COND_OWN_RX_BUSY; | 67 | ax25->condition &= ~AX25_COND_OWN_RX_BUSY; |
68 | ax25->condition &= ~AX25_COND_ACK_PENDING; | 68 | ax25->condition &= ~AX25_COND_ACK_PENDING; |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index ce0b13d44385..5f4eb73fb9d3 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -43,10 +43,10 @@ | |||
43 | * Callsign/UID mapper. This is in kernel space for security on multi-amateur machines. | 43 | * Callsign/UID mapper. This is in kernel space for security on multi-amateur machines. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | HLIST_HEAD(ax25_uid_list); | 46 | static HLIST_HEAD(ax25_uid_list); |
47 | static DEFINE_RWLOCK(ax25_uid_lock); | 47 | static DEFINE_RWLOCK(ax25_uid_lock); |
48 | 48 | ||
49 | int ax25_uid_policy = 0; | 49 | int ax25_uid_policy; |
50 | 50 | ||
51 | EXPORT_SYMBOL(ax25_uid_policy); | 51 | EXPORT_SYMBOL(ax25_uid_policy); |
52 | 52 | ||
@@ -144,6 +144,7 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | |||
144 | #ifdef CONFIG_PROC_FS | 144 | #ifdef CONFIG_PROC_FS |
145 | 145 | ||
146 | static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) | 146 | static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) |
147 | __acquires(ax25_uid_lock) | ||
147 | { | 148 | { |
148 | struct ax25_uid_assoc *pt; | 149 | struct ax25_uid_assoc *pt; |
149 | struct hlist_node *node; | 150 | struct hlist_node *node; |
@@ -167,6 +168,7 @@ static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
167 | } | 168 | } |
168 | 169 | ||
169 | static void ax25_uid_seq_stop(struct seq_file *seq, void *v) | 170 | static void ax25_uid_seq_stop(struct seq_file *seq, void *v) |
171 | __releases(ax25_uid_lock) | ||
170 | { | 172 | { |
171 | read_unlock(&ax25_uid_lock); | 173 | read_unlock(&ax25_uid_lock); |
172 | } | 174 | } |