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/ax25/ax25_uid.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/ax25/ax25_uid.c')
-rw-r--r-- | net/ax25/ax25_uid.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index a8b3822f3ee4..d53cc8615865 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -168,12 +168,14 @@ static void ax25_uid_seq_stop(struct seq_file *seq, void *v) | |||
168 | 168 | ||
169 | static int ax25_uid_seq_show(struct seq_file *seq, void *v) | 169 | static int ax25_uid_seq_show(struct seq_file *seq, void *v) |
170 | { | 170 | { |
171 | char buf[11]; | ||
172 | |||
171 | if (v == SEQ_START_TOKEN) | 173 | if (v == SEQ_START_TOKEN) |
172 | seq_printf(seq, "Policy: %d\n", ax25_uid_policy); | 174 | seq_printf(seq, "Policy: %d\n", ax25_uid_policy); |
173 | else { | 175 | else { |
174 | struct ax25_uid_assoc *pt = v; | 176 | struct ax25_uid_assoc *pt = v; |
175 | 177 | ||
176 | seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call)); | 178 | seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(buf, &pt->call)); |
177 | } | 179 | } |
178 | return 0; | 180 | return 0; |
179 | } | 181 | } |