linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Hu Tao <hutao@cn.fujitsu.com>
Subject: Re: [PATCH for 3.4] virtio-scsi: fix TMF use-after-free
Date: Tue, 01 May 2012 09:52:19 +0100	[thread overview]
Message-ID: <1335862339.2996.5.camel@dabdike> (raw)
In-Reply-To: <4F9F9A52.8010100@redhat.com>

On Tue, 2012-05-01 at 10:09 +0200, Paolo Bonzini wrote:
> Il 18/04/2012 16:09, James Bottomley ha scritto:
> >> > Fix a race in TMF path, where cmd may have been already freed
> >> > by virtscsi_complete_free after waking up from the completion.
> > There's no may about this; the command will be freed long before the
> > completion waiter is awoken.  The description could be clearer.
> > 
> > The problem is a use after free in virtscsi_tmf because the
> > virtio_scsi_command is freed before the completion returns.
> > 
> > The fix is to make callers specifying a completion responsible for
> > freeing the command in all cases.
> 
> I don't see this in the pull request, were you waiting for v2 with a
> better commit message?

That would be because you didn't reply.  I was expecting either a
comment or a rewording of the change log.  My inbox works by threads
rising to the top and completed ones going into the patch queue.  If
no-one replys to a thread expecting one, it just gets lost.

James



      reply	other threads:[~2012-05-01  8:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 13:46 [PATCH for 3.4] virtio-scsi: fix TMF use-after-free Paolo Bonzini
2012-04-18 14:01 ` Zhi Yong Wu
2012-04-18 14:09 ` James Bottomley
2012-05-01  8:09   ` Paolo Bonzini
2012-05-01  8:52     ` James Bottomley [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=1335862339.2996.5.camel@dabdike \
    --to=james.bottomley@hansenpartnership.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).