[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>
This commit is contained in:
committed by
David S. Miller
parent
f2c383988d
commit
f75268cd6c
@@ -168,12 +168,14 @@ static void ax25_uid_seq_stop(struct seq_file *seq, void *v)
|
||||
|
||||
static int ax25_uid_seq_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
char buf[11];
|
||||
|
||||
if (v == SEQ_START_TOKEN)
|
||||
seq_printf(seq, "Policy: %d\n", ax25_uid_policy);
|
||||
else {
|
||||
struct ax25_uid_assoc *pt = v;
|
||||
|
||||
seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call));
|
||||
seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(buf, &pt->call));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user