aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose/rose_subr.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-08 16:40:41 -0400
committerDavid S. Miller <davem@davemloft.net>2005-09-08 16:40:41 -0400
commitbaed16a7ff5194487764db300c2753ac7409c4c5 (patch)
treea6cc8276bdd41abee85df26a894980a4de5d504c /net/rose/rose_subr.c
parent3a93481589dc80d9ff9082731f35031b0345442e (diff)
[AX.25]: Make asc2ax() thread-proof
Asc2ax was still using a static buffer for all invocations which isn't exactly SMP-safe. Change asc2ax to take an additional result buffer as the argument. Change all callers to provide such a buffer. This one only really is a fix for ROSE and as per recent discussions there's still much more to fix in ROSE ... Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose/rose_subr.c')
-rw-r--r--net/rose/rose_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rose/rose_subr.c b/net/rose/rose_subr.c
index 02891ce2db37..36a77944622b 100644
--- a/net/rose/rose_subr.c
+++ b/net/rose/rose_subr.c
@@ -337,13 +337,13 @@ static int rose_parse_ccitt(unsigned char *p, struct rose_facilities_struct *fac
337 memcpy(&facilities->source_addr, p + 7, ROSE_ADDR_LEN); 337 memcpy(&facilities->source_addr, p + 7, ROSE_ADDR_LEN);
338 memcpy(callsign, p + 12, l - 10); 338 memcpy(callsign, p + 12, l - 10);
339 callsign[l - 10] = '\0'; 339 callsign[l - 10] = '\0';
340 facilities->source_call = *asc2ax(callsign); 340 asc2ax(&facilities->source_call, callsign);
341 } 341 }
342 if (*p == FAC_CCITT_SRC_NSAP) { 342 if (*p == FAC_CCITT_SRC_NSAP) {
343 memcpy(&facilities->dest_addr, p + 7, ROSE_ADDR_LEN); 343 memcpy(&facilities->dest_addr, p + 7, ROSE_ADDR_LEN);
344 memcpy(callsign, p + 12, l - 10); 344 memcpy(callsign, p + 12, l - 10);
345 callsign[l - 10] = '\0'; 345 callsign[l - 10] = '\0';
346 facilities->dest_call = *asc2ax(callsign); 346 asc2ax(&facilities->dest_call, callsign);
347 } 347 }
348 p += l + 2; 348 p += l + 2;
349 n += l + 2; 349 n += l + 2;