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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4D9A7B9D.7060604@metafoo.de>
Date:	Tue, 05 Apr 2011 04:17:01 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Timur Tabi <timur@...escale.com>
CC:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Ok to call disable_irq before request_irq?

On 04/05/2011 02:53 AM, Timur Tabi wrote:
> Is it okay to call disable_irq() before calling request_irq()?  My
> device creates lots of spurious interrupts, and so I want the
> interrupt enable only when I expect a real interrupt to occur.  It
> seems to work, but I just want to make sure it's a proper technique.
> 

It might work in your case, but in general that would certainly be really bad
practice.
If the irq was not requested before request_irq should enable the IRQ
regardless of whether irq_disable was called or not.

I have a patch which adds the IRQF_NOAUTOEN flag, which allows you to request a
IRQ without automatically enabling it. Unfortunately the current version of the
patch will fail if your irq_chip implements the irq_startup callback. I've
attached the patch.

- Lars

View attachment "irqf_noautoen.patch" of type "text/x-diff" (1682 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ