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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 05 Mar 2014 08:12:41 +0100
From:	Christian Riesch <christian.riesch@...cron.at>
To:	Florian Fainelli <f.fainelli@...il.com>,
	Prabhakar Lad <prabhakar.csengg@...il.com>
cc:	netdev <netdev@...r.kernel.org>, Jon Ringle <jon@...gle.org>,
	dlos <davinci-linux-open-source@...ux.davincidsp.com>,
	stable <stable@...r.kernel.org>
Subject: Re: [PATCH] net: davinci_emac: Move call of devm_request_irq to
 emac_dev_open



--On March 04, 2014 09:53 -0800 Florian Fainelli <f.fainelli@...il.com> 
wrote:

> 2014-03-04 9:30 GMT-08:00 Prabhakar Lad <prabhakar.csengg@...il.com>:
>> Hi Christian,
>>
>> Thanks for the patch.
>>
>>
>> On Tue, Mar 4, 2014 at 7:37 PM, Christian Riesch
>> <christian.riesch@...cron.at> wrote:
>>> In commit 6892b41d9701283085b655c6086fb57a5d63fa47
>>>
>>> Author: Lad, Prabhakar <prabhakar.csengg@...il.com>
>>> Date:   Tue Jun 25 21:24:51 2013 +0530
>>> net: davinci: emac: Convert to devm_* api
>>>
>>> the call of request_irq is replaced by devm_request_irq and the call
>>> of free_irq is removed. But since interrupts are requested in
>>> emac_dev_open, doing ifconfig up/down on the board requests the
>>> interrupts again each time, causing devm_request_irq to fail.
>>>
>>> This patch moves the interrupt requests to emac_dev_open and thus
>>> fixes this regression.
>>>
>>> Reported-by: Jon Ringle <jon@...gle.org>
>>> Signed-off-by: Christian Riesch <christian.riesch@...cron.at>
>>> Cc: Lad, Prabhakar <prabhakar.csengg@...il.com>
>>> Cc: <stable@...r.kernel.org>
>>
>> This patch fixes issue pointed at
>> http://comments.gmane.org/gmane.linux.davinci/28135
>> tested on Logic PD.
>>
>>  Reported-and-tested-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
>>
>> Assuming you will respin the patch fixing the header.
>>> ---
>>>
>>> Hi,
>>> This is an attempt to fix the bug discussed in
>>> https://lkml.org/lkml/2014/3/4/218
>>>
>>> Since I am not really familiar with interrupts I am not sure if this is
>>> the right way to do it. I am looking forward to your comments.
>>>
>> Looks OK.
>
> I think a plain revert of Prabhakar patch would bring us in an "usual"
> situation where the drivers's ndo_open():
>
> - masks all interrupts bits at the Ethernet MAC level
> - calls request_irq()
> - unmask relevant interrupts bits at the Ethernet Mac level
>
> just in case some uncontrolled interrupt bit triggers an interrupt
> while the interface is down for instance...

I am fine with either solution and I will be happy to prepare a patch if we 
agree that we should revert the patch. What was the reason for commit 
6892b41d9701283085b655c6086fb57a5d63fa47 in the first place? Does it fix a 
problem?

Should the full commit 6892b41d9701283085b655c6086fb57a5d63fa47 be 
reverted? Actually it consists of two parts, the first part replaces 
request_irq with devm_request_irq and throws out free_irq, the second part 
replaces devm_request_mem_region/devm_ioremap with devm_ioremap_resource. 
The first part causes the problem. Shall we keep the second part or shall 
this be reverted as well?

Christian


>
> On a wider note, it would be good to get some tool to notify people
> that attempting to replace devm_request_irq() in a network driver's
> ndo_open() function is not going to produce the expected results as
> the two are not strictly identical.
> --
> Florian
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ