diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-09-06 18:49:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-06 18:49:39 -0400 |
commit | f75268cd6cbd24e6c70ff1390f4de5d0bb618539 (patch) | |
tree | ade569781c444bd7f0d648a38cab205d7624e286 /net/rose/af_rose.c | |
parent | f2c383988d68c91a7d474b7cf26c0a2df49bbafe (diff) |
[AX25]: Make ax2asc thread-proof
Ax2asc was still using a static buffer for all invocations which isn't
exactly SMP-safe. Change ax2asc to take an additional result buffer as
the argument. Change all callers to provide such a buffer.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose/af_rose.c')
-rw-r--r-- | net/rose/af_rose.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index c6e59f84c3ae..3077878ed4f0 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -1363,6 +1363,8 @@ static void rose_info_stop(struct seq_file *seq, void *v) | |||
1363 | 1363 | ||
1364 | static int rose_info_show(struct seq_file *seq, void *v) | 1364 | static int rose_info_show(struct seq_file *seq, void *v) |
1365 | { | 1365 | { |
1366 | char buf[11]; | ||
1367 | |||
1366 | if (v == SEQ_START_TOKEN) | 1368 | if (v == SEQ_START_TOKEN) |
1367 | seq_puts(seq, | 1369 | seq_puts(seq, |
1368 | "dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n"); | 1370 | "dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n"); |
@@ -1380,12 +1382,12 @@ static int rose_info_show(struct seq_file *seq, void *v) | |||
1380 | 1382 | ||
1381 | seq_printf(seq, "%-10s %-9s ", | 1383 | seq_printf(seq, "%-10s %-9s ", |
1382 | rose2asc(&rose->dest_addr), | 1384 | rose2asc(&rose->dest_addr), |
1383 | ax2asc(&rose->dest_call)); | 1385 | ax2asc(buf, &rose->dest_call)); |
1384 | 1386 | ||
1385 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) | 1387 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) |
1386 | callsign = "??????-?"; | 1388 | callsign = "??????-?"; |
1387 | else | 1389 | else |
1388 | callsign = ax2asc(&rose->source_call); | 1390 | callsign = ax2asc(buf, &rose->source_call); |
1389 | 1391 | ||
1390 | seq_printf(seq, | 1392 | seq_printf(seq, |
1391 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", | 1393 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", |