Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f210e072235c3c123b068d348a1a02e624ff5be
Commit:     4f210e072235c3c123b068d348a1a02e624ff5be
Parent:     990e3743b505a0bb08c04a381d5477e19d31ef5e
Author:     Hendrik Borghorst <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 5 14:28:11 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:45:29 2007 -0300

    V4L/DVB (5505): Fix Kernel Bugzilla #8301: spinlock fix for flexcop-pci
    
    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.
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/b2c2/flexcop-pci.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c 
b/drivers/media/dvb/b2c2/flexcop-pci.c
index 6e16680..01af4d2 100644
--- a/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -127,10 +127,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);
 
@@ -194,7 +195,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;
 }
@@ -293,12 +294,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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to