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: <20190828184859.3712bed8@dellmb.labs.office.nic.cz>
Date:   Wed, 28 Aug 2019 18:48:59 +0200
From:   Marek BehĂșn <marek.behun@....cz>
To:     Vivien Didelot <vivien.didelot@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, f.fainelli@...il.com,
        andrew@...n.ch
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: get serdes lane after
 lock

On Wed, 28 Aug 2019 12:26:11 -0400
Vivien Didelot <vivien.didelot@...il.com> wrote:

> This is a follow-up patch for commit 17deaf5cb37a ("net: dsa:
> mv88e6xxx: create serdes_get_lane chip operation").
> 
> The .serdes_get_lane implementations access the CMODE of a port,
> even though it is cached at the moment, it is safer to call them
> after the mutex is locked, not before.
> 
> At the same time, check for an eventual error and return IRQ_DONE,
> instead of blindly ignoring it.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...il.com>
> ---
>  drivers/net/dsa/mv88e6xxx/serdes.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c
> b/drivers/net/dsa/mv88e6xxx/serdes.c index 9424e401dbc7..38c0da2492c0
> 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.c
> +++ b/drivers/net/dsa/mv88e6xxx/serdes.c
> @@ -646,10 +646,12 @@ static irqreturn_t
> mv88e6390_serdes_thread_fn(int irq, void *dev_id) int err;
>  	u8 lane;
>  
> -	mv88e6xxx_serdes_get_lane(chip, port->port, &lane);
> -
>  	mv88e6xxx_reg_lock(chip);
>  
> +	err = mv88e6xxx_serdes_get_lane(chip, port->port, &lane);
> +	if (err)
> +		goto out;
> +
>  	switch (cmode) {
>  	case MV88E6XXX_PORT_STS_CMODE_SGMII:
>  	case MV88E6XXX_PORT_STS_CMODE_1000BASEX:

Reviewed-by: Marek BehĂșn <marek.behun@....cz>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ