qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Priebe <s.priebe@profihost.ag>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PATCH V2: fix NULL dereferences / races between task completition and abort
Date: Tue, 14 Aug 2012 22:27:31 +0200	[thread overview]
Message-ID: <1344976052-28499-1-git-send-email-s.priebe@profihost.ag> (raw)

This patch fixes a race and some segfaults which i discovered while testing scsi-generic
and unmapping with libiscsi.

The first problem is that in iscsi_aio_cancel iscsi_scsi_task_cancel and 
iscsi_task_mgmt_abort_task_async got called but iscsi_task_mgmt_abort_task_async already
calls iscsi_scsi_task_cancel.

The second problem is that scsi_free_scsi_task(acb->task) and acb->task = NULL must be done
when io is complete or the whole task cancelation has finished. Right now it is done in
between.

Sorry no native speaker i hope i was able to explain what the problem is. Otherwise Ronnie
is informed and perhaps explain the problem too.

             reply	other threads:[~2012-08-14 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 20:27 Stefan Priebe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-15  7:09 [Qemu-devel] PATCH V2: fix NULL dereferences / races between task completition and abort Stefan Priebe

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=1344976052-28499-1-git-send-email-s.priebe@profihost.ag \
    --to=s.priebe@profihost.ag \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).