* [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload
@ 2018-11-27 19:28 Cathy Avery
2018-11-27 20:12 ` Dan Carpenter
2018-11-28 23:56 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Cathy Avery @ 2018-11-27 19:28 UTC (permalink / raw)
To: martin.petersen, jejb, hch, jgill; +Cc: emilne, devel, linux-kernel, linux-scsi
Currently pvscsi_remove calls free_irq more than once as
pvscsi_release_resources and __pvscsi_shutdown both call
pvscsi_shutdown_intr. This results in a 'Trying to free
already-free IRQ' warning and stack trace. To solve the problem
pvscsi_shutdown_intr has been moved out of pvscsi_release_resources.
Signed-off-by: Cathy Avery <cavery@redhat.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/vmw_pvscsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 6e49102..0d6b2a8 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1202,8 +1202,6 @@ static void pvscsi_shutdown_intr(struct pvscsi_adapter *adapter)
static void pvscsi_release_resources(struct pvscsi_adapter *adapter)
{
- pvscsi_shutdown_intr(adapter);
-
if (adapter->workqueue)
destroy_workqueue(adapter->workqueue);
@@ -1534,6 +1532,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
out_reset_adapter:
ll_adapter_reset(adapter);
out_release_resources:
+ pvscsi_shutdown_intr(adapter);
pvscsi_release_resources(adapter);
scsi_host_put(host);
out_disable_device:
@@ -1542,6 +1541,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return error;
out_release_resources_and_disable:
+ pvscsi_shutdown_intr(adapter);
pvscsi_release_resources(adapter);
goto out_disable_device;
}
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload
2018-11-27 19:28 [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload Cathy Avery
@ 2018-11-27 20:12 ` Dan Carpenter
2018-11-28 23:56 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-11-27 20:12 UTC (permalink / raw)
To: Cathy Avery
Cc: martin.petersen, jejb, hch, jgill, devel, linux-kernel, emilne,
linux-scsi
On Tue, Nov 27, 2018 at 02:28:53PM -0500, Cathy Avery wrote:
> Currently pvscsi_remove calls free_irq more than once as
> pvscsi_release_resources and __pvscsi_shutdown both call
> pvscsi_shutdown_intr. This results in a 'Trying to free
> already-free IRQ' warning and stack trace. To solve the problem
> pvscsi_shutdown_intr has been moved out of pvscsi_release_resources.
>
> Signed-off-by: Cathy Avery <cavery@redhat.com>
> Reviewed-by: Ewan D. Milne <emilne@redhat.com>
That bug has been there since the driver was introduced in 2009. It's
so amazing that no one has fixed it until now...
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload
2018-11-27 19:28 [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload Cathy Avery
2018-11-27 20:12 ` Dan Carpenter
@ 2018-11-28 23:56 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-11-28 23:56 UTC (permalink / raw)
To: Cathy Avery
Cc: martin.petersen, jejb, hch, jgill, emilne, devel, linux-kernel,
linux-scsi
Cathy,
> Currently pvscsi_remove calls free_irq more than once as
> pvscsi_release_resources and __pvscsi_shutdown both call
> pvscsi_shutdown_intr. This results in a 'Trying to free
> already-free IRQ' warning and stack trace. To solve the problem
> pvscsi_shutdown_intr has been moved out of pvscsi_release_resources.
Applied to 4.20/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-28 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 19:28 [PATCH] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload Cathy Avery
2018-11-27 20:12 ` Dan Carpenter
2018-11-28 23:56 ` Martin K. Petersen
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).