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: <4B90079C.7080404@kernel.org>
Date:	Thu, 04 Mar 2010 11:18:52 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Eric Biederman <ebiederm@...ssion.com>,
	LKML <linux-kernel@...r.kernel.org>, Julia Lawall <julia@...u.dk>
Subject: Re: [PATCH 06/12] genericirq: make irq_chip related function to take
 desc

On 03/04/2010 06:31 AM, Thomas Gleixner wrote:
> On Thu, 4 Mar 2010, Yinghai Lu wrote:
> 
>>  /*
>>   * Fixup enable/disable function pointers
>>   */
>>  void irq_chip_set_defaults(struct irq_chip *chip)
>>  {
>> +	if (!chip->desc_enable)
>> +		chip->desc_enable = default_enable_desc;
>> +	if (!chip->desc_disable)
>> +		chip->desc_disable = default_disable_desc;
>> +	if (!chip->desc_startup)
>> +		chip->desc_startup = default_startup_desc;
> 
>   This will break all irq_chips which implement enable, disable or
>   startup. so the check needs to be:
> 
>   	   if (!chip->enable && !chip->desc_enable) 
> 
>> +	/*
>> +	 * We use chip->disable, when the user provided its own. When
>> +	 * we have default_disable set for chip->disable, then we need
>> +	 * to use default_shutdown, otherwise the irq line is not
>> +	 * disabled on free_irq():
>> +	 */
>> +	if (!chip->desc_shutdown)
>> +		chip->desc_shutdown = chip->desc_disable != default_disable_desc ?
>> +			chip->desc_disable : default_shutdown_desc;
>> +	if (!chip->desc_end)
>> +		chip->desc_end = dummy_irq_chip.desc_end;
> 
>   Same  here.

should be:

/*
 * Fixup enable/disable function pointers
 */
static void irq_chip_set_defaults_desc(struct irq_chip *chip)
{
        if (!chip->desc_enable && !chip->enable)
                chip->desc_enable = default_enable_desc;
        if (!chip->desc_disable)
                chip->desc_disable = default_disable_desc;
        if (!chip->desc_startup)
                chip->desc_startup = default_startup_desc;
        /*
         * We use chip->disable, when the user provided its own. When
         * we have default_disable set for chip->disable, then we need
         * to use default_shutdown, otherwise the irq line is not
         * disabled on free_irq():
         */
        if (!chip->desc_shutdown)
                chip->desc_shutdown = chip->desc_disable != default_disable_desc ?
                        chip->desc_disable : default_shutdown_desc;
        if (!chip->desc_end)
                chip->desc_end = dummy_irq_chip.desc_end;
}
static void irq_chip_set_defaults_irq(struct irq_chip *chip)
{
        if (!chip->enable)
                chip->enable = default_enable;
        if (!chip->disable)
                chip->disable = default_disable;
        if (!chip->startup)
                chip->startup = default_startup;
        /*
         * We use chip->disable, when the user provided its own. When
         * we have default_disable set for chip->disable, then we need
         * to use default_shutdown, otherwise the irq line is not
         * disabled on free_irq():
         */
        if (!chip->shutdown)
                chip->shutdown = chip->disable != default_disable ?
                        chip->disable : default_shutdown;
        if (!chip->end)
                chip->end = dummy_irq_chip.end;
}
void irq_chip_set_defaults(struct irq_chip *chip)
{
        if (chip->desc_mask && chip->desc_unmask)
                irq_chip_set_defaults_desc(chip);
        else
                irq_chip_set_defaults_irq(chip);

        if (!chip->name)
                chip->name = chip->typename;
}
--
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