提交 1bd40573 编写于 作者: M Matthew Wilcox 提交者: James Bottomley

[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: NMatthew Wilcox <matthew@wil.cx>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 dffe807c
......@@ -907,9 +907,10 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
void aha152x_release(struct Scsi_Host *shpnt)
{
if(!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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册