qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] PATCH V2: fix NULL dereferences / races between task completition and abort
@ 2012-08-14 20:27 Stefan Priebe
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Priebe @ 2012-08-14 20:27 UTC (permalink / raw)
  To: qemu-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [Qemu-devel] PATCH V2: fix NULL dereferences / races between task completition and abort
@ 2012-08-15  7:09 Stefan Priebe
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Priebe @ 2012-08-15  7:09 UTC (permalink / raw)
  To: qemu-devel

This patch fixes two main issues with block/iscsi.c:
1.) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which was also directly
    called in iscsi_aio_cancel

2.) a race between task completition and task abortion could happen cause the scsi_free_scsi_task
    were done before iscsi_schedule_bh has finished

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-15  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 20:27 [Qemu-devel] PATCH V2: fix NULL dereferences / races between task completition and abort Stefan Priebe
  -- strict thread matches above, loose matches on Subject: below --
2012-08-15  7:09 Stefan Priebe

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).