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: <4EBBD39C.9000400@gmail.com>
Date:	Thu, 10 Nov 2011 07:37:32 -0600
From:	Rob Herring <robherring2@...il.com>
To:	Jamie Iles <jamie@...ieiles.com>
CC:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH] irq: fix possible null-pointer deref irq_domain_to_irq

On 11/10/2011 05:14 AM, Jamie Iles wrote:
> On Thu, Nov 10, 2011 at 10:53:03AM +0000, Jamie Iles wrote:
>> It is optional for an irqdomain to have a to_irq() method, and for
>> simple domains they often don't require any operations at all - just
>> hwirq to Linux irq translation.  Check we have valid ops before
>> dereferencing them.
>>
>> Patch originally by Rob Herring.
>>
>> Suggested-by: Rob Herring <robherring2@...il.com>
> 
> Naturally git send-email doesn't know how to convert this into a CC, so 
> Rob is now CC'd!
> 
> Jamie
> 
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Grant Likely <grant.likely@...retlab.ca>
>> Signed-off-by: Jamie Iles <jamie@...ieiles.com>
>> ---
>>
>> Rob, I can't see that you've already posted this but I didn't want to
>> hold Marc's GIC patches up.

Thanks. I didn't get around to it yesterday.

Acked-by: Rob Herring <rob.herring@...xeda.com>

Rob

>>
>>  include/linux/irqdomain.h |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
>> index 99834e58..78a1e66 100644
>> --- a/include/linux/irqdomain.h
>> +++ b/include/linux/irqdomain.h
>> @@ -74,7 +74,7 @@ struct irq_domain {
>>  static inline unsigned int irq_domain_to_irq(struct irq_domain *d,
>>  					     unsigned long hwirq)
>>  {
>> -	if (d->ops->to_irq)
>> +	if (d->ops && d->ops->to_irq)
>>  		return d->ops->to_irq(d, hwirq);
>>  	if (WARN_ON(hwirq < d->hwirq_base))
>>  		return 0;
>> -- 
>> 1.7.4.1
>>

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