From: WANG Cong <xiyou.wangcong@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [RELEASE] Lguest for 2.6.21
Date: Thu, 3 May 2007 03:59:31 +0800 [thread overview]
Message-ID: <20070502195931.GB1502@localhost.localdomain> (raw)
In-Reply-To: <20070502193303.GA1502@localhost.localdomain>
On Thu, May 03, 2007 at 03:33:03AM +0800, WANG Cong wrote:
>Hi Rusty!
>
>I found you forgot to check the return value of copy_from_user, and here is the fix for drivers/lguest/interrupts_and_traps.c.
>
Also this one, in drivers/lguest/hypercalls.c.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
---
--- linux-2.6.21-rc7-mm2/drivers/lguest/hypercalls.c.orig 2007-05-03 03:45:53.000000000 +0800
+++ linux-2.6.21-rc7-mm2/drivers/lguest/hypercalls.c 2007-05-03 03:46:20.000000000 +0800
@@ -102,7 +102,8 @@ static void do_async_hcalls(struct lgues
unsigned int i;
u8 st[LHCALL_RING_SIZE];
- copy_from_user(&st, &lg->lguest_data->hcall_status, sizeof(st));
+ if (copy_from_user(&st, &lg->lguest_data->hcall_status, sizeof(st)))
+ return;
for (i = 0; i < ARRAY_SIZE(st); i++) {
struct lguest_regs regs;
unsigned int n = lg->next_hcall;
next prev parent reply other threads:[~2007-05-02 19:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 14:43 Rusty Russell
2007-05-02 19:33 ` WANG Cong
2007-05-02 19:59 ` WANG Cong [this message]
2007-05-02 23:00 ` Rusty Russell
2007-05-03 3:57 ` WANG Cong
2007-05-03 4:20 ` Rusty Russell
2007-05-03 5:43 ` WANG Cong
2007-05-03 16:02 ` Matt Mackall
2007-05-04 0:13 ` Rusty Russell
2007-05-04 0:43 ` Rusty Russell
2007-05-04 3:20 ` Matt Mackall
2007-05-04 3:39 ` Rusty Russell
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=20070502195931.GB1502@localhost.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®