Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bd40573 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by James Bottomley
Browse files

[SCSI] aha152x: Close narrow race in release



We were releasing the IRQ before removing the host, so commands could
still be coming in which would never be seen by the interrupt handler.
Just remove the host before releasing the IRQ to close this race.

Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent dffe807c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -910,6 +910,7 @@ void aha152x_release(struct Scsi_Host *shpnt)
	if (!shpnt)
		return;

	scsi_remove_host(shpnt);
	if (shpnt->irq)
		free_irq(shpnt->irq, shpnt);

@@ -923,7 +924,6 @@ void aha152x_release(struct Scsi_Host *shpnt)
		pnp_device_detach(HOSTDATA(shpnt)->pnpdev);
#endif

	scsi_remove_host(shpnt);
	list_del(&HOSTDATA(shpnt)->host_list);
	scsi_host_put(shpnt);
}