diff options
Diffstat (limited to 'net/rose')
-rw-r--r-- | net/rose/af_rose.c | 8 | ||||
-rw-r--r-- | net/rose/rose_in.c | 2 | ||||
-rw-r--r-- | net/rose/rose_route.c | 10 |
3 files changed, 14 insertions, 6 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 323d42a7b360..4a31a81059ab 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -116,7 +116,7 @@ int rosecmp(rose_address *addr1, rose_address *addr2) | |||
116 | */ | 116 | */ |
117 | int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) | 117 | int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) |
118 | { | 118 | { |
119 | int i, j; | 119 | unsigned int i, j; |
120 | 120 | ||
121 | if (mask > 10) | 121 | if (mask > 10) |
122 | return 1; | 122 | return 1; |
@@ -973,8 +973,8 @@ int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct ros | |||
973 | */ | 973 | */ |
974 | memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); | 974 | memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); |
975 | 975 | ||
976 | len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2; | 976 | len = (((skb->data[3] >> 4) & 0x0F) + 1) >> 1; |
977 | len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2; | 977 | len += (((skb->data[3] >> 0) & 0x0F) + 1) >> 1; |
978 | if (!rose_parse_facilities(skb->data + len + 4, &facilities)) { | 978 | if (!rose_parse_facilities(skb->data + len + 4, &facilities)) { |
979 | rose_transmit_clear_request(neigh, lci, ROSE_INVALID_FACILITY, 76); | 979 | rose_transmit_clear_request(neigh, lci, ROSE_INVALID_FACILITY, 76); |
980 | return 0; | 980 | return 0; |
@@ -1377,6 +1377,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1377 | 1377 | ||
1378 | #ifdef CONFIG_PROC_FS | 1378 | #ifdef CONFIG_PROC_FS |
1379 | static void *rose_info_start(struct seq_file *seq, loff_t *pos) | 1379 | static void *rose_info_start(struct seq_file *seq, loff_t *pos) |
1380 | __acquires(rose_list_lock) | ||
1380 | { | 1381 | { |
1381 | int i; | 1382 | int i; |
1382 | struct sock *s; | 1383 | struct sock *s; |
@@ -1404,6 +1405,7 @@ static void *rose_info_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1404 | } | 1405 | } |
1405 | 1406 | ||
1406 | static void rose_info_stop(struct seq_file *seq, void *v) | 1407 | static void rose_info_stop(struct seq_file *seq, void *v) |
1408 | __releases(rose_list_lock) | ||
1407 | { | 1409 | { |
1408 | spin_unlock_bh(&rose_list_lock); | 1410 | spin_unlock_bh(&rose_list_lock); |
1409 | } | 1411 | } |
diff --git a/net/rose/rose_in.c b/net/rose/rose_in.c index 4ee0879d3540..7f7fcb46b4fa 100644 --- a/net/rose/rose_in.c +++ b/net/rose/rose_in.c | |||
@@ -182,7 +182,7 @@ static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int framety | |||
182 | break; | 182 | break; |
183 | } | 183 | } |
184 | if (atomic_read(&sk->sk_rmem_alloc) > | 184 | if (atomic_read(&sk->sk_rmem_alloc) > |
185 | (sk->sk_rcvbuf / 2)) | 185 | (sk->sk_rcvbuf >> 1)) |
186 | rose->condition |= ROSE_COND_OWN_RX_BUSY; | 186 | rose->condition |= ROSE_COND_OWN_RX_BUSY; |
187 | } | 187 | } |
188 | /* | 188 | /* |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 540c0f26ffee..fb9359fb2358 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -994,8 +994,8 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
994 | goto out; | 994 | goto out; |
995 | } | 995 | } |
996 | 996 | ||
997 | len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2; | 997 | len = (((skb->data[3] >> 4) & 0x0F) + 1) >> 1; |
998 | len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2; | 998 | len += (((skb->data[3] >> 0) & 0x0F) + 1) >> 1; |
999 | 999 | ||
1000 | memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); | 1000 | memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); |
1001 | 1001 | ||
@@ -1068,6 +1068,7 @@ out: | |||
1068 | #ifdef CONFIG_PROC_FS | 1068 | #ifdef CONFIG_PROC_FS |
1069 | 1069 | ||
1070 | static void *rose_node_start(struct seq_file *seq, loff_t *pos) | 1070 | static void *rose_node_start(struct seq_file *seq, loff_t *pos) |
1071 | __acquires(rose_neigh_list_lock) | ||
1071 | { | 1072 | { |
1072 | struct rose_node *rose_node; | 1073 | struct rose_node *rose_node; |
1073 | int i = 1; | 1074 | int i = 1; |
@@ -1091,6 +1092,7 @@ static void *rose_node_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1091 | } | 1092 | } |
1092 | 1093 | ||
1093 | static void rose_node_stop(struct seq_file *seq, void *v) | 1094 | static void rose_node_stop(struct seq_file *seq, void *v) |
1095 | __releases(rose_neigh_list_lock) | ||
1094 | { | 1096 | { |
1095 | spin_unlock_bh(&rose_neigh_list_lock); | 1097 | spin_unlock_bh(&rose_neigh_list_lock); |
1096 | } | 1098 | } |
@@ -1144,6 +1146,7 @@ const struct file_operations rose_nodes_fops = { | |||
1144 | }; | 1146 | }; |
1145 | 1147 | ||
1146 | static void *rose_neigh_start(struct seq_file *seq, loff_t *pos) | 1148 | static void *rose_neigh_start(struct seq_file *seq, loff_t *pos) |
1149 | __acquires(rose_neigh_list_lock) | ||
1147 | { | 1150 | { |
1148 | struct rose_neigh *rose_neigh; | 1151 | struct rose_neigh *rose_neigh; |
1149 | int i = 1; | 1152 | int i = 1; |
@@ -1167,6 +1170,7 @@ static void *rose_neigh_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1167 | } | 1170 | } |
1168 | 1171 | ||
1169 | static void rose_neigh_stop(struct seq_file *seq, void *v) | 1172 | static void rose_neigh_stop(struct seq_file *seq, void *v) |
1173 | __releases(rose_neigh_list_lock) | ||
1170 | { | 1174 | { |
1171 | spin_unlock_bh(&rose_neigh_list_lock); | 1175 | spin_unlock_bh(&rose_neigh_list_lock); |
1172 | } | 1176 | } |
@@ -1227,6 +1231,7 @@ const struct file_operations rose_neigh_fops = { | |||
1227 | 1231 | ||
1228 | 1232 | ||
1229 | static void *rose_route_start(struct seq_file *seq, loff_t *pos) | 1233 | static void *rose_route_start(struct seq_file *seq, loff_t *pos) |
1234 | __acquires(rose_route_list_lock) | ||
1230 | { | 1235 | { |
1231 | struct rose_route *rose_route; | 1236 | struct rose_route *rose_route; |
1232 | int i = 1; | 1237 | int i = 1; |
@@ -1250,6 +1255,7 @@ static void *rose_route_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1250 | } | 1255 | } |
1251 | 1256 | ||
1252 | static void rose_route_stop(struct seq_file *seq, void *v) | 1257 | static void rose_route_stop(struct seq_file *seq, void *v) |
1258 | __releases(rose_route_list_lock) | ||
1253 | { | 1259 | { |
1254 | spin_unlock_bh(&rose_route_list_lock); | 1260 | spin_unlock_bh(&rose_route_list_lock); |
1255 | } | 1261 | } |