diff options
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/af_ax25.c | 14 | ||||
-rw-r--r-- | net/ax25/ax25_ds_subr.c | 8 | ||||
-rw-r--r-- | net/ax25/ax25_ds_timer.c | 4 | ||||
-rw-r--r-- | net/ax25/ax25_iface.c | 18 |
4 files changed, 22 insertions, 22 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index f12be2acf9bc..000695c48583 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -145,7 +145,7 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, | |||
145 | ax25_cb *s; | 145 | ax25_cb *s; |
146 | struct hlist_node *node; | 146 | struct hlist_node *node; |
147 | 147 | ||
148 | spin_lock_bh(&ax25_list_lock); | 148 | spin_lock(&ax25_list_lock); |
149 | ax25_for_each(s, node, &ax25_list) { | 149 | ax25_for_each(s, node, &ax25_list) { |
150 | if ((s->iamdigi && !digi) || (!s->iamdigi && digi)) | 150 | if ((s->iamdigi && !digi) || (!s->iamdigi && digi)) |
151 | continue; | 151 | continue; |
@@ -154,12 +154,12 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, | |||
154 | /* If device is null we match any device */ | 154 | /* If device is null we match any device */ |
155 | if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) { | 155 | if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) { |
156 | sock_hold(s->sk); | 156 | sock_hold(s->sk); |
157 | spin_unlock_bh(&ax25_list_lock); | 157 | spin_unlock(&ax25_list_lock); |
158 | return s->sk; | 158 | return s->sk; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | } | 161 | } |
162 | spin_unlock_bh(&ax25_list_lock); | 162 | spin_unlock(&ax25_list_lock); |
163 | 163 | ||
164 | return NULL; | 164 | return NULL; |
165 | } | 165 | } |
@@ -174,7 +174,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, | |||
174 | ax25_cb *s; | 174 | ax25_cb *s; |
175 | struct hlist_node *node; | 175 | struct hlist_node *node; |
176 | 176 | ||
177 | spin_lock_bh(&ax25_list_lock); | 177 | spin_lock(&ax25_list_lock); |
178 | ax25_for_each(s, node, &ax25_list) { | 178 | ax25_for_each(s, node, &ax25_list) { |
179 | if (s->sk && !ax25cmp(&s->source_addr, my_addr) && | 179 | if (s->sk && !ax25cmp(&s->source_addr, my_addr) && |
180 | !ax25cmp(&s->dest_addr, dest_addr) && | 180 | !ax25cmp(&s->dest_addr, dest_addr) && |
@@ -185,7 +185,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, | |||
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | spin_unlock_bh(&ax25_list_lock); | 188 | spin_unlock(&ax25_list_lock); |
189 | 189 | ||
190 | return sk; | 190 | return sk; |
191 | } | 191 | } |
@@ -235,7 +235,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) | |||
235 | struct sk_buff *copy; | 235 | struct sk_buff *copy; |
236 | struct hlist_node *node; | 236 | struct hlist_node *node; |
237 | 237 | ||
238 | spin_lock_bh(&ax25_list_lock); | 238 | spin_lock(&ax25_list_lock); |
239 | ax25_for_each(s, node, &ax25_list) { | 239 | ax25_for_each(s, node, &ax25_list) { |
240 | if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && | 240 | if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && |
241 | s->sk->sk_type == SOCK_RAW && | 241 | s->sk->sk_type == SOCK_RAW && |
@@ -248,7 +248,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) | |||
248 | kfree_skb(copy); | 248 | kfree_skb(copy); |
249 | } | 249 | } |
250 | } | 250 | } |
251 | spin_unlock_bh(&ax25_list_lock); | 251 | spin_unlock(&ax25_list_lock); |
252 | } | 252 | } |
253 | 253 | ||
254 | /* | 254 | /* |
diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c index 1d4ab641f82b..4d22d4430ec8 100644 --- a/net/ax25/ax25_ds_subr.c +++ b/net/ax25/ax25_ds_subr.c | |||
@@ -80,7 +80,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25) | |||
80 | ax25_start_t3timer(ax25); | 80 | ax25_start_t3timer(ax25); |
81 | ax25_ds_set_timer(ax25->ax25_dev); | 81 | ax25_ds_set_timer(ax25->ax25_dev); |
82 | 82 | ||
83 | spin_lock_bh(&ax25_list_lock); | 83 | spin_lock(&ax25_list_lock); |
84 | ax25_for_each(ax25o, node, &ax25_list) { | 84 | ax25_for_each(ax25o, node, &ax25_list) { |
85 | if (ax25o == ax25) | 85 | if (ax25o == ax25) |
86 | continue; | 86 | continue; |
@@ -106,7 +106,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25) | |||
106 | if (ax25o->state != AX25_STATE_0) | 106 | if (ax25o->state != AX25_STATE_0) |
107 | ax25_start_t3timer(ax25o); | 107 | ax25_start_t3timer(ax25o); |
108 | } | 108 | } |
109 | spin_unlock_bh(&ax25_list_lock); | 109 | spin_unlock(&ax25_list_lock); |
110 | } | 110 | } |
111 | 111 | ||
112 | void ax25_ds_establish_data_link(ax25_cb *ax25) | 112 | void ax25_ds_establish_data_link(ax25_cb *ax25) |
@@ -162,13 +162,13 @@ static int ax25_check_dama_slave(ax25_dev *ax25_dev) | |||
162 | int res = 0; | 162 | int res = 0; |
163 | struct hlist_node *node; | 163 | struct hlist_node *node; |
164 | 164 | ||
165 | spin_lock_bh(&ax25_list_lock); | 165 | spin_lock(&ax25_list_lock); |
166 | ax25_for_each(ax25, node, &ax25_list) | 166 | ax25_for_each(ax25, node, &ax25_list) |
167 | if (ax25->ax25_dev == ax25_dev && (ax25->condition & AX25_COND_DAMA_MODE) && ax25->state > AX25_STATE_1) { | 167 | if (ax25->ax25_dev == ax25_dev && (ax25->condition & AX25_COND_DAMA_MODE) && ax25->state > AX25_STATE_1) { |
168 | res = 1; | 168 | res = 1; |
169 | break; | 169 | break; |
170 | } | 170 | } |
171 | spin_unlock_bh(&ax25_list_lock); | 171 | spin_unlock(&ax25_list_lock); |
172 | 172 | ||
173 | return res; | 173 | return res; |
174 | } | 174 | } |
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c index 5961459935eb..4f44185955c7 100644 --- a/net/ax25/ax25_ds_timer.c +++ b/net/ax25/ax25_ds_timer.c | |||
@@ -85,7 +85,7 @@ static void ax25_ds_timeout(unsigned long arg) | |||
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | spin_lock_bh(&ax25_list_lock); | 88 | spin_lock(&ax25_list_lock); |
89 | ax25_for_each(ax25, node, &ax25_list) { | 89 | ax25_for_each(ax25, node, &ax25_list) { |
90 | if (ax25->ax25_dev != ax25_dev || !(ax25->condition & AX25_COND_DAMA_MODE)) | 90 | if (ax25->ax25_dev != ax25_dev || !(ax25->condition & AX25_COND_DAMA_MODE)) |
91 | continue; | 91 | continue; |
@@ -93,7 +93,7 @@ static void ax25_ds_timeout(unsigned long arg) | |||
93 | ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); | 93 | ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); |
94 | ax25_disconnect(ax25, ETIMEDOUT); | 94 | ax25_disconnect(ax25, ETIMEDOUT); |
95 | } | 95 | } |
96 | spin_unlock_bh(&ax25_list_lock); | 96 | spin_unlock(&ax25_list_lock); |
97 | 97 | ||
98 | ax25_dev_dama_off(ax25_dev); | 98 | ax25_dev_dama_off(ax25_dev); |
99 | } | 99 | } |
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index 77ba07c67682..07ac0207eb69 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c | |||
@@ -66,10 +66,10 @@ int ax25_protocol_register(unsigned int pid, | |||
66 | protocol->pid = pid; | 66 | protocol->pid = pid; |
67 | protocol->func = func; | 67 | protocol->func = func; |
68 | 68 | ||
69 | write_lock(&protocol_list_lock); | 69 | write_lock_bh(&protocol_list_lock); |
70 | protocol->next = protocol_list; | 70 | protocol->next = protocol_list; |
71 | protocol_list = protocol; | 71 | protocol_list = protocol; |
72 | write_unlock(&protocol_list_lock); | 72 | write_unlock_bh(&protocol_list_lock); |
73 | 73 | ||
74 | return 1; | 74 | return 1; |
75 | } | 75 | } |
@@ -80,16 +80,16 @@ void ax25_protocol_release(unsigned int pid) | |||
80 | { | 80 | { |
81 | struct protocol_struct *s, *protocol; | 81 | struct protocol_struct *s, *protocol; |
82 | 82 | ||
83 | write_lock(&protocol_list_lock); | 83 | write_lock_bh(&protocol_list_lock); |
84 | protocol = protocol_list; | 84 | protocol = protocol_list; |
85 | if (protocol == NULL) { | 85 | if (protocol == NULL) { |
86 | write_unlock(&protocol_list_lock); | 86 | write_unlock_bh(&protocol_list_lock); |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | 89 | ||
90 | if (protocol->pid == pid) { | 90 | if (protocol->pid == pid) { |
91 | protocol_list = protocol->next; | 91 | protocol_list = protocol->next; |
92 | write_unlock(&protocol_list_lock); | 92 | write_unlock_bh(&protocol_list_lock); |
93 | kfree(protocol); | 93 | kfree(protocol); |
94 | return; | 94 | return; |
95 | } | 95 | } |
@@ -98,14 +98,14 @@ void ax25_protocol_release(unsigned int pid) | |||
98 | if (protocol->next->pid == pid) { | 98 | if (protocol->next->pid == pid) { |
99 | s = protocol->next; | 99 | s = protocol->next; |
100 | protocol->next = protocol->next->next; | 100 | protocol->next = protocol->next->next; |
101 | write_unlock(&protocol_list_lock); | 101 | write_unlock_bh(&protocol_list_lock); |
102 | kfree(s); | 102 | kfree(s); |
103 | return; | 103 | return; |
104 | } | 104 | } |
105 | 105 | ||
106 | protocol = protocol->next; | 106 | protocol = protocol->next; |
107 | } | 107 | } |
108 | write_unlock(&protocol_list_lock); | 108 | write_unlock_bh(&protocol_list_lock); |
109 | } | 109 | } |
110 | 110 | ||
111 | EXPORT_SYMBOL(ax25_protocol_release); | 111 | EXPORT_SYMBOL(ax25_protocol_release); |
@@ -266,13 +266,13 @@ int ax25_protocol_is_registered(unsigned int pid) | |||
266 | struct protocol_struct *protocol; | 266 | struct protocol_struct *protocol; |
267 | int res = 0; | 267 | int res = 0; |
268 | 268 | ||
269 | read_lock(&protocol_list_lock); | 269 | read_lock_bh(&protocol_list_lock); |
270 | for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) | 270 | for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) |
271 | if (protocol->pid == pid) { | 271 | if (protocol->pid == pid) { |
272 | res = 1; | 272 | res = 1; |
273 | break; | 273 | break; |
274 | } | 274 | } |
275 | read_unlock(&protocol_list_lock); | 275 | read_unlock_bh(&protocol_list_lock); |
276 | 276 | ||
277 | return res; | 277 | return res; |
278 | } | 278 | } |