Commit 1fb0a11c authored by Wesley W. Terpstra's avatar Wesley W. Terpstra

wishbone: fix a race where an about-to-quit master gets the next MSI

parent afae5412
...@@ -419,6 +419,11 @@ static int char_master_release(struct inode *inode, struct file *filep) ...@@ -419,6 +419,11 @@ static int char_master_release(struct inode *inode, struct file *filep)
spin_lock_irqsave(&wb->spinlock, flags); spin_lock_irqsave(&wb->spinlock, flags);
/* Unhook any MSI access */
if (context->msi_index != -1) {
wb->msi_map[context->msi_index] = 0;
}
/* Finish any unhandled MSI */ /* Finish any unhandled MSI */
if (context->msi_pending) { if (context->msi_pending) {
context->msi_pending = 0; context->msi_pending = 0;
...@@ -427,10 +432,6 @@ static int char_master_release(struct inode *inode, struct file *filep) ...@@ -427,10 +432,6 @@ static int char_master_release(struct inode *inode, struct file *filep)
advance_msi(wb); advance_msi(wb);
} }
/* Unhook any MSI access */
if (context->msi_index != -1) {
wb->msi_map[context->msi_index] = 0;
}
spin_unlock_irqrestore(&wb->spinlock, flags); spin_unlock_irqrestore(&wb->spinlock, flags);
kfree(context); kfree(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment