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]
Date:	Fri, 09 Jan 2015 09:43:57 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Jiang Liu <jiang.liu@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] genirq: Abstract access to irq_chip flags

On 09/01/15 03:00, Jiang Liu wrote:
> On 2015/1/9 1:32, Marc Zyngier wrote:
>> In order to safely migrate to a cumulative set of flags, start by
>> abstracting the way we look at these flags. There is otherwise no
>> change in semantics here.
> <snit>
>> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>> index 8069237..b2a43e0 100644
>> --- a/kernel/irq/manage.c
>> +++ b/kernel/irq/manage.c
>> @@ -491,7 +491,7 @@ static int set_irq_wake_real(unsigned int irq, unsigned int on)
>>  	struct irq_desc *desc = irq_to_desc(irq);
>>  	int ret = -ENXIO;
>>  
>> -	if (irq_desc_get_chip(desc)->flags &  IRQCHIP_SKIP_SET_WAKE)
>> +	if (irq_desc_get_chip_flags(desc) &  IRQCHIP_SKIP_SET_WAKE)
>>  		return 0;
>>  
>>  	if (desc->irq_data.chip->irq_set_wake)
>> @@ -589,7 +589,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
>>  
>>  	flags &= IRQ_TYPE_SENSE_MASK;
>>  
>> -	if (chip->flags & IRQCHIP_SET_TYPE_MASKED) {
>> +	if (irq_desc_get_chip_flags(desc) & IRQCHIP_SET_TYPE_MASKED) {
>>  		if (!irqd_irq_masked(&desc->irq_data))
>>  			mask_irq(desc);
>>  		if (!irqd_irq_disabled(&desc->irq_data))
>> @@ -1043,7 +1043,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
>>  	 * chip flags, so we can avoid the unmask dance at the end of
>>  	 * the threaded handler for those.
>>  	 */
>> -	if (desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)
>> +	if (irq_desc_get_chip_flags(desc) & IRQCHIP_ONESHOT_SAFE)
>>  		new->flags &= ~IRQF_ONESHOT;
>>  
>>  	/*
> Hi Mark,
> 	Seems you missed on instance of IRQCHIP_ONESHOT_SAFE in
> __setup_irq() as below.
> Thanks!
> Gerry
> -----------------------------------------------------------------
>         } else if (new->handler == irq_default_primary_handler &&
>                    !(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) {
> ------------------------------------------------------------------

Ah, nice catch.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...
--
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