lkml.org 
[lkml]   [2007]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 04/16] per-cpu run guest
Date
On Friday 21 December 2007 00:33:44 Glauber de Oliveira Costa wrote:
> @@ -55,11 +55,15 @@ static int user_send_irq(struct lguest *lg, const
> unsigned long __user *input) static ssize_t read(struct file *file, char
> __user *user, size_t size,loff_t*o) {
> struct lguest *lg = file->private_data;
> + struct lguest_vcpu *vcpu = NULL;
> + unsigned int vcpu_id = *o;
>
> /* You must write LHREQ_INITIALIZE first! */
> if (!lg)
> return -EINVAL;
>
> + vcpu = &lg->vcpus[vcpu_id];
> +

Better do a bounds check here!

Cheers,
Rusty.


\
 
 \ /
  Last update: 2007-12-26 00:43    [W:0.087 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site