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:	Fri, 22 Oct 2010 15:43:22 +0200
From:	Richard Weinberger <richard@....at>
To:	<linux-kernel@...r.kernel.org>, <mingo@...hat.com>,
	<hpa@...or.com>, <tglx@...utronix.de>
Cc:	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:irq/core] genirq: Warn if enable_irq is called before irq is
 set up

On Fri, 22 Oct 2010 13:09:49 GMT, tip-bot for Thomas Gleixner
<tglx@...utronix.de> wrote:
> Commit-ID:  658fc358f9954083ea55abf82ca77a18f82412d7
> Gitweb:    
> http://git.kernel.org/tip/658fc358f9954083ea55abf82ca77a18f82412d7
> Author:     Thomas Gleixner <tglx@...utronix.de>
> AuthorDate: Fri, 22 Oct 2010 14:47:57 +0200
> Committer:  Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Fri, 22 Oct 2010 15:05:35 +0200
> 
> genirq: Warn if enable_irq is called before irq is set up
> 
> The recent changes in the genirq core unearthed a bug in arch/um which
> called enable_irq() before the interrupt was set up. 
> 
> Warn and return instead of crashing the machine with a NULL pointer
> dereference.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Richard Weinberger <richard@....at>
> ---
>  kernel/irq/manage.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 644e8d5..2806023 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -324,6 +324,10 @@ void enable_irq(unsigned int irq)
>  	if (!desc)
>  		return;
>  
> +	if (WARN(!desc->irq_data.chip || !desc->irq_data.chip->irq_enable,
> +	    "KERN_ERR enable_irq before setup/request_irq: irq %u\n", irq))

Here is a little typo. The double quote should be after KERN_ERR.

Thanks,
//richard

> +		return;
> +
>  	chip_bus_lock(desc);
>  	raw_spin_lock_irqsave(&desc->lock, flags);
>  	__enable_irq(desc, irq, false);

--
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