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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130605224147.584263E10E4@localhost>
Date:	Wed, 05 Jun 2013 23:41:47 +0100
From:	Grant Likely <grant.likely@...aro.org>
To:	Chen Gang <gang.chen@...anux.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.

On Tue, 14 May 2013 19:02:45 +0800, Chen Gang <gang.chen@...anux.com> wrote:
> 
> Since irq_data may be NULL, if so, we WARN_ON(), and continue, 'hwirq'
> which related with 'irq_data' has to initialize later, or it will cause
> issue.
> 
> Signed-off-by: Chen Gang <gang.chen@...anux.com>

Applied, thanks.

g.

> ---
>  kernel/irq/irqdomain.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af804b5..61abbfa 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -400,11 +400,12 @@ static void irq_domain_disassociate_many(struct irq_domain *domain,
>  	while (count--) {
>  		int irq = irq_base + count;
>  		struct irq_data *irq_data = irq_get_irq_data(irq);
> -		irq_hw_number_t hwirq = irq_data->hwirq;
> +		irq_hw_number_t hwirq;
>  
>  		if (WARN_ON(!irq_data || irq_data->domain != domain))
>  			continue;
>  
> +		hwirq = irq_data->hwirq;
>  		irq_set_status_flags(irq, IRQ_NOREQUEST);
>  
>  		/* remove chip and handler */
> -- 
> 1.7.7.6

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
--
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