lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4651BEFD.2080700@technord.com>
Date:	Mon, 21 May 2007 17:47:09 +0200
From:	alain meirhaeghe <ame@...hnord.com>
To:	linux-kernel@...r.kernel.org
Subject: PROBLEM: module i2c_pca_isa PC9564, interrupt problem

Hello,
I think there is a bug in i2c_pca_isa driver.
Problem is interrupt running on arm720 system linux-2.6.20.1.

Description of the problem:
When driver write to pc9564 an infinite loop interrupt appear (bloquing 
the system).


J think it is because the acknowledge of interrupt is not do correctly.
Acknowledge of interrupt is done outside interrupt .
J think it is dangerous if latency time of interrupt is short (as in ARM 
processor).

See existing code below:
static int pca_isa_waitforinterrupt(struct i2c_algo_pca_data *adap)
{
    int ret = 0;
    if (irq > -1)
    {
        ret = wait_event_interruptible(pca_wait,pca_isa_readbyte(adap, 
I2C_PCA_CON) & I2C_PCA_CON_SI);
      
    } else
    {
        while ((pca_isa_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
            udelay(100);
    }
    return ret;
}

static irqreturn_t pca_handler(int this_irq, void *dev_id) {
   
    wake_up_interruptible(&pca_wait);
    return IRQ_HANDLED;
}

Isa_wait is never waked because pca_handler is always call, because j 
think it is necessary to acknowledge the interrupt in the interrupt 
handler as usual.
My temporary solution is:
static irqreturn_t pca_handler(int this_irq, void *dev_id) {
    disable_irq(irq);   // !!!!!!!!!!!!!!!!!!! temporary patch
    wake_up_interruptible(&pca_wait);
    return IRQ_HANDLED;
}



How can we correct this  ?

Thank to all
Alain Meirhaeghe




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ