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:   Sat, 3 Sep 2016 22:23:53 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Jeremy Linton <jeremy.linton@....com>, netdev@...r.kernel.org
Cc:     steve.glendinning@...well.net, andrew@...n.ch, will.deacon@....com
Subject: Re: [PATCH 4/4] net: smsc911x: Move interrupt allocation to open/stop

On 09/01/2016 11:15 PM, Jeremy Linton wrote:

> The /proc/irq/xx information is incorrect for smsc911x because
> the request_irq is happening before the register_netdev has the
> proper device name. Moving it to the open also fixes the case
> of when the device is renamed.
>
> Reported-by: Will Deacon <will.deacon@....com>
> Signed-off-by: Jeremy Linton <jeremy.linton@....com>
> ---
>  drivers/net/ethernet/smsc/smsc911x.c | 47 ++++++++++++++----------------------
>  1 file changed, 18 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
> index c2e56f0..4f8910b 100644
> --- a/drivers/net/ethernet/smsc/smsc911x.c
> +++ b/drivers/net/ethernet/smsc/smsc911x.c
[...]
> @@ -2480,38 +2491,18 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
>  	if (retval < 0)
>  		goto out_disable_resources;
>
> -	/* configure irq polarity and type before connecting isr */
> -	if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH)
> -		intcfg |= INT_CFG_IRQ_POL_;
> -
> -	if (pdata->config.irq_type == SMSC911X_IRQ_TYPE_PUSH_PULL)
> -		intcfg |= INT_CFG_IRQ_TYPE_;
> -
> -	smsc911x_reg_write(pdata, INT_CFG, intcfg);
> -
> -	/* Ensure interrupts are globally disabled before connecting ISR */
> -	smsc911x_disable_irq_chip(dev);
> -

    Hmm, I didn't see where this code got moved to...

> -	retval = request_irq(dev->irq, smsc911x_irqhandler,
> -			     irq_flags | IRQF_SHARED, dev->name, dev);
> -	if (retval) {
> -		SMSC_WARN(pdata, probe,
> -			  "Unable to claim requested irq: %d", dev->irq);
> -		goto out_disable_resources;
> -	}
> -
>  	netif_carrier_off(dev);
>

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ