From: Ben Collins <bcollins@debian.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] Fix thinko in mips/mips64 sys_sysmips
Date: Mon, 26 May 2003 10:37:55 -0400 [thread overview]
Message-ID: <20030526143755.GT2657@phunnypharm.org> (raw)
This has already been fixed in Linus' tree. Here's hoping it gets into
2.4 sometime soon. Note in the patch that "node" is the userspace
pointer and "nodename" is the string where "node" was
strncpy_from_user()'d to.
So it really should be using "nodename".
Index: linux-2.4/arch/mips64/kernel/syscall.c
===================================================================
--- linux-2.4/arch/mips64/kernel/syscall.c (revision 3226)
+++ linux-2.4/arch/mips64/kernel/syscall.c (working copy)
@@ -207,7 +207,7 @@
return -EFAULT;
down_write(&uts_sem);
- strncpy(system_utsname.nodename, name, len);
+ strncpy(system_utsname.nodename, nodename, len);
system_utsname.nodename[len] = '\0';
up_write(&uts_sem);
return 0;
Index: linux-2.4/arch/mips/kernel/sysmips.c
===================================================================
--- linux-2.4/arch/mips/kernel/sysmips.c (revision 3226)
+++ linux-2.4/arch/mips/kernel/sysmips.c (working copy)
@@ -65,7 +65,7 @@
return -EFAULT;
down_write(&uts_sem);
- strncpy(system_utsname.nodename, name, len);
+ strncpy(system_utsname.nodename, nodename, len);
system_utsname.nodename[len] = '\0';
up_write(&uts_sem);
return 0;
next reply other threads:[~2003-05-26 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 14:37 Ben Collins [this message]
2003-05-27 4:24 ` [PATCH] Fix thinko in mips/mips64 sys_sysmips Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030526143755.GT2657@phunnypharm.org \
--to=bcollins@debian.org \
--cc=linux-mips@linux-mips.org \
--cc=marcelo@conectiva.com.br \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox