« Previous | Next » 

Revision c9b308d2

IDc9b308d20b642c106048f088ccc31f2aa7cf59ba

Added by Alexander Graf about 12 years ago

AHCI: Fix port reset race

bdrv_aio_cancel() can trigger bdrv_aio_flush() which makes all aio
that is currently in flight finish. So what we do is:

port reset
detect ncq in flight
cancel ncq
delete ncq sg list

at which point we have double freed the sg list. Instead, with this
patch we do:

port reset
detect ncq in flight
cancel ncq
check if we are really still in flight
delete ncq sg list

which makes things work and gets rid of the race.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences