All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Eugene Teo <eugeneteo@kernel.sg>
Cc: linux-kernel@vger.kernel.org, lguest@ozlabs.org
Subject: Re: [PATCH] lguest: make sure cpu is initialized before accessing it
Date: Tue, 4 Mar 2008 11:19:44 +1100	[thread overview]
Message-ID: <200803041119.44283.rusty@rustcorp.com.au> (raw)
In-Reply-To: <200803041015.48290.rusty@rustcorp.com.au>

On Tuesday 04 March 2008 10:15:47 Rusty Russell wrote:
> On Sunday 10 February 2008 02:53:17 Eugene Teo wrote:
> > If req is LHREQ_INITIALIZE, and the guest has been initialized before
> > (unlikely), it will attempt to access cpu->tsk even though cpu is not yet
> > initialized.
> >
> > Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>

Thanks Eugene, I've applied this with some wrapping of the comments and 
removal of the now-redundant lg != NULL tests:

> > +		/* Once the Guest is dead, all you can do is read() why it died. */
> > +		if (lg && lg->dead)
> > +			return -ENOENT;
> >
> > -	/* If you're not the task which owns the Guest, you can only break */
> > -	if (lg && current != cpu->tsk && req != LHREQ_BREAK)
> > -		return -EPERM;
> > +		/* If you're not the task which owns the Guest, you can only break */
> > +		if (lg && current != cpu->tsk && req != LHREQ_BREAK)
> > +			return -EPERM;
> > +	}

Cheers,
Rusty.

      parent reply	other threads:[~2008-03-04  0:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 15:53 [PATCH] lguest: make sure cpu is initialized before accessing it Eugene Teo
     [not found] ` <200803041015.48290.rusty@rustcorp.com.au>
2008-03-04  0:19   ` Rusty Russell [this message]

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=200803041119.44283.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=eugeneteo@kernel.sg \
    --cc=lguest@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.