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: <CAMuHMdUcF1djS8XMHxhaDKVJZN0-d+xwh83jKFKV3isaqN+QzQ@mail.gmail.com>
Date:   Mon, 19 Sep 2016 11:32:12 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Marc Zyngier <marc.zyngier@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] genirq: Skip chained interrupt trigger configuration if
 type is IRQ_TYPE_NONE

Hi Thomas,

On Mon, Sep 19, 2016 at 11:28 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Mon, 19 Sep 2016, Marc Zyngier wrote:
>> On 19/09/16 10:12, Thomas Gleixner wrote:
>> > On Mon, 19 Sep 2016, Marc Zyngier wrote:
>> >>    if (handle != handle_bad_irq && is_chained) {
>> >> +          unsigned int type = irqd_get_trigger_type(&desc->irq_data);
>> >> +
>> >>            /*
>> >>             * We're about to start this interrupt immediately,
>> >>             * hence the need to set the trigger configuration.
>> >> @@ -828,8 +830,10 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
>> >>             * chained interrupt. Reset it immediately because we
>> >>             * do know better.
>> >>             */
>> >> -          __irq_set_trigger(desc, irqd_get_trigger_type(&desc->irq_data));
>> >> -          desc->handle_irq = handle;
>> >> +          if (type != IRQ_TYPE_NONE) {
>> >> +                  __irq_set_trigger(desc, type);
>> >> +                  desc->handle_irq = handle;
>> >
>> > Are you really sure that the handler should only be set when the trigger
>> > type is != NONE? I seriously doubt that this is correct.
>>
>> The handler has already been set outside of if() statement (at line
>> 819). Here, we only set it again if we've actually called
>> __irq_set_trigger() which could have changed it to something that takes
>> the type into account (handle_level_irq or handle_edge_irq, for example).
>
> Ah. I'll add a comment...

The comment is already there ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ