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] [day] [month] [year] [list]
Date:   Thu, 26 Mar 2020 12:01:29 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     idosch@...sch.org
Cc:     netdev@...r.kernel.org, jiri@...lanox.com, mlxsw@...lanox.com,
        idosch@...lanox.com
Subject: Re: [PATCH net] mlxsw: spectrum_mr: Fix list iteration in error
 path

From: Ido Schimmel <idosch@...sch.org>
Date: Thu, 26 Mar 2020 16:17:33 +0200

> From: Ido Schimmel <idosch@...lanox.com>
> 
> list_for_each_entry_from_reverse() iterates backwards over the list from
> the current position, but in the error path we should start from the
> previous position.
> 
> Fix this by using list_for_each_entry_continue_reverse() instead.
> 
> This suppresses the following error from coccinelle:
> 
> drivers/net/ethernet/mellanox/mlxsw//spectrum_mr.c:655:34-38: ERROR:
> invalid reference to the index variable of the iterator on line 636
> 
> Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic")
> Signed-off-by: Ido Schimmel <idosch@...lanox.com>
> Reviewed-by: Jiri Pirko <jiri@...lanox.com>

Applied and queued up for -stable, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ