From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, adobriyan@mail.ru
Subject: [patch 07/10] arch/i386/kernel/traps.c: fix sparse warnings
Date: Sat, 19 Mar 2005 14:17:35 +0100 [thread overview]
Message-ID: <20050319131735.930951ECA8@trashy.coderock.org> (raw)
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/arch/i386/kernel/traps.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff -puN arch/i386/kernel/traps.c~sparse-arch_i386_kernel_traps arch/i386/kernel/traps.c
--- kj/arch/i386/kernel/traps.c~sparse-arch_i386_kernel_traps 2005-03-18 20:05:19.000000000 +0100
+++ kj-domen/arch/i386/kernel/traps.c 2005-03-18 20:05:19.000000000 +0100
@@ -233,22 +233,22 @@ void show_registers(struct pt_regs *regs
* time of the fault..
*/
if (in_kernel) {
- u8 *eip;
+ u8 __user *eip;
printk("\nStack: ");
show_stack(NULL, (unsigned long*)esp);
printk("Code: ");
- eip = (u8 *)regs->eip - 43;
+ eip = (u8 __user *)regs->eip - 43;
for (i = 0; i < 64; i++, eip++) {
unsigned char c;
- if (eip < (u8 *)PAGE_OFFSET || __get_user(c, eip)) {
+ if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) {
printk(" Bad EIP value.");
break;
}
- if (eip == (u8 *)regs->eip)
+ if (eip == (u8 __user *)regs->eip)
printk("<%02x> ", c);
else
printk("%02x ", c);
@@ -272,13 +272,13 @@ static void handle_BUG(struct pt_regs *r
if (eip < PAGE_OFFSET)
goto no_bug;
- if (__get_user(ud2, (unsigned short *)eip))
+ if (__get_user(ud2, (unsigned short __user *)eip))
goto no_bug;
if (ud2 != 0x0b0f)
goto no_bug;
- if (__get_user(line, (unsigned short *)(eip + 2)))
+ if (__get_user(line, (unsigned short __user *)(eip + 2)))
goto bug;
- if (__get_user(file, (char **)(eip + 4)) ||
+ if (__get_user(file, (char * __user *)(eip + 4)) ||
(unsigned long)file < PAGE_OFFSET || __get_user(c, file))
file = "<bad filename>";
_
next reply other threads:[~2005-03-19 13:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 13:17 domen [this message]
2005-03-20 11:15 ` [patch 07/10 with proper signed-off] arch/i386/kernel/traps.c: fix sparse warnings Domen Puncer
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=20050319131735.930951ECA8@trashy.coderock.org \
--to=domen@coderock.org \
--cc=adobriyan@mail.ru \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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