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-next>] [day] [month] [year] [list]
Date:	Thu, 21 Feb 2008 17:04:04 +0100
From:	Pioz <pioz84@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Keyboard interrupt - request_irq()

Hi all,
  I have a problem.
I want handle the keyboard interrupt and for this purpose I have write
this module (I have kernel 2.6.23):


#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>

[...]

irqreturn_t
irq_myhandler (int irqn, void *dev)
{
        printk (KERN_INFO "Key pressed...\n");
        return IRQ_HANDLED;
}

int
init_module ()
{
        int res;
        printk (KERN_INFO "Hello World!\n");
        free_irq (1, NULL);
        res = request_irq (1, irq_myhandler, IRQF_SHARED, "bao", dev_id);
        printk (KERN_INFO "res: %d\n", res);
        return 0;
}

void
cleanup_module ()
{
        free_irq (1, NULL);
        printk (KERN_INFO "Goodbye World!\n");
}


The return value of request_irq() function is -EBUSY. Why? Is the
default handler? How can I do to change handler with my function?
Thanks...
--
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