# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1497 -> 1.1498 # drivers/scsi/libata-core.c 1.8 -> 1.9 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/12/05 jgarzik@redhat.com 1.1498 # [libata] fix use-after-free # # Fixes oops some were seeing on module unload. # # Caught by Jon Burgess. # -------------------------------------------- # diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c Fri Dec 5 13:46:54 2003 +++ b/drivers/scsi/libata-core.c Fri Dec 5 13:46:54 2003 @@ -3224,8 +3224,6 @@ scsi_host_put(ap->host); /* FIXME: check return val */ } - kfree(host_set); - pci_release_regions(pdev); for (i = 0; i < host_set->n_ports; i++) { @@ -3242,6 +3240,7 @@ } } + kfree(host_set); pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); }