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-next>] [day] [month] [year] [list]
Message-ID: <20161207141144.GJ18817@lunn.ch>
Date:   Wed, 7 Dec 2016 15:11:44 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Volodymyr Bendiuga <volodymyr.bendiuga@...termo.se>
Cc:     vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
        netdev@...r.kernel.org, volodymyr.bendiuga@...il.com,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v2] dsa:mv88e6xxx: dispose irq mapping for
 chip->irq

On Wed, Dec 07, 2016 at 11:35:07AM +0100, Volodymyr Bendiuga wrote:
> Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@...termo.se>

You need some text in the Change log. Say why this change is needed,
etc.

Looking through other users of of_irq_get(), i don't see any disposing
of the mapping. It is not obvious you need to do this. The name does
not give any hint.

Maybe we should add an of_irq_put() which would clean up the mapping?

      Andrew


> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 173ea97..0c3271d 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -4483,7 +4483,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
>  		mutex_unlock(&chip->reg_lock);
>  
>  		if (err)
> -			goto out;
> +			goto out_dispose;
>  
>  		if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT)) {
>  			err = mv88e6xxx_g2_irq_setup(chip);
> @@ -4513,6 +4513,9 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
>  		mv88e6xxx_g1_irq_free(chip);
>  		mutex_unlock(&chip->reg_lock);
>  	}
> +
> +out_dispose:
> +	irq_dispose_mapping(chip->irq);
>  out:
>  	return err;
>  }
> @@ -4530,6 +4533,7 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
>  		if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT))
>  			mv88e6xxx_g2_irq_free(chip);
>  		mv88e6xxx_g1_irq_free(chip);
> +		irq_dispose_mapping(chip->irq);
>  	}
>  }
>  
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ