diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-05 14:28:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-05 14:28:11 -0300 |
commit | 8837539c53da20bfea20ba8f47f824fa8ff6068c (patch) | |
tree | 19d6e6b547022b0578f9b8b49bc0004b4907a35c /linux/drivers | |
parent | 910c5021fc903ded7629606514254b37a0ae1c3e (diff) | |
download | mediapointer-dvb-s2-8837539c53da20bfea20ba8f47f824fa8ff6068c.tar.gz mediapointer-dvb-s2-8837539c53da20bfea20ba8f47f824fa8ff6068c.tar.bz2 |
Fix Kernel Bugzilla #8301: spinlock fix for flexcop-pci
# Now, patch author (just the main one), on a From: field
# Please change below if the committer is not the patch author.
#
From Hendrik Borghorst <hendrik@borghorst.org>
# Then a detailed description:
If you modprobe the b2c2-flexcop-pci module you got a hardlock of your system.
This is due the usage of spin_lock before spin_lock_init is called.
# At the end Signed-off-by: fields by patch author and committer, at least.
#
Signed-Off-By: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-pci.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-pci.c b/linux/drivers/media/dvb/b2c2/flexcop-pci.c index 648f319b2..4388a78a1 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-pci.c @@ -143,10 +143,11 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id) { struct flexcop_pci *fc_pci = dev_id; struct flexcop_device *fc = fc_pci->fc_dev; + unsigned long flags; flexcop_ibi_value v; irqreturn_t ret = IRQ_HANDLED; - spin_lock_irq(&fc_pci->irq_lock); + spin_lock_irqsave(&fc_pci->irq_lock,flags); v = fc->read_ibi_reg(fc,irq_20c); @@ -210,7 +211,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id) ret = IRQ_NONE; } - spin_unlock_irq(&fc_pci->irq_lock); + spin_unlock_irqrestore(&fc_pci->irq_lock,flags); return ret; } @@ -309,12 +310,12 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) } pci_set_drvdata(fc_pci->pdev, fc_pci); - + spin_lock_init(&fc_pci->irq_lock); if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0) goto err_pci_iounmap; - spin_lock_init(&fc_pci->irq_lock); + fc_pci->init_state |= FC_PCI_INIT; return ret; |