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: <2674af740911040449h14eaac35y2ec3016862479bc6@mail.gmail.com>
Date:	Wed, 4 Nov 2009 20:49:41 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Prarit Bhargava <prarit@...hat.com>, linux-kernel@...r.kernel.org,
	ebiederm@...ssion.com, akpm@...ux-foundation.org,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH]: use spin_lock_irqsave in try_one_irq()

On Wed, Nov 4, 2009 at 5:18 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Tue, 3 Nov 2009, Yong Zhang wrote:
>
>> > This happens because the &desc->lock is taken with spin_lock_irqsave and
>> > just a spin_lock.  In the try_one_irq(), this lock really should be a
>> > spin_lock_irqsave().
>> >

>> So I think the following patch is also workable to you.
>
> Yes, that's sufficient.
>
>> diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
>> index 114e704..11affbc 100644
>> --- a/kernel/irq/spurious.c
>> +++ b/kernel/irq/spurious.c
>> @@ -111,6 +111,7 @@ static void poll_all_shared_irqs(void)
>>
>>       for_each_irq_desc(i, desc) {
>>               unsigned int status;
>> +             unsigned long flags;
>>
>>               if (!i)
>>                        continue;
>> @@ -121,7 +122,9 @@ static void poll_all_shared_irqs(void)
>>               if (!(status & IRQ_SPURIOUS_DISABLED))
>>                       continue;
>>
>> +             local_irq_save(flags);
>>               try_one_irq(i, desc);
>> +             local_irq_restore(flags);
>
>  You can even use local_irq_en/disable() here.

Yup, I will resend the patch later.

Thanks,
Yong

>
> Thanks,
>
>        tglx
--
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