diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-05-06 10:23:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-11 14:47:34 +0200 |
commit | 4248f4649bf317611702186960917cd8912bc798 (patch) | |
tree | 60c2e7b5da1f71b2bda7ad1f2b6dd382aa188dee /net/openvswitch | |
parent | 9aa4602237d535b83c579eb752e8fc1c3e7e7055 (diff) | |
download | linux-stable-4248f4649bf317611702186960917cd8912bc798.tar.gz linux-stable-4248f4649bf317611702186960917cd8912bc798.tar.bz2 linux-stable-4248f4649bf317611702186960917cd8912bc798.zip |
mlxsw: spectrum_mr: Update egress RIF list before route's action
commit cbaf3f6af9c268caf558c8e7ec52bcb35c5455dd upstream.
Each multicast route that is forwarding packets (as opposed to trapping
them) points to a list of egress router interfaces (RIFs) through which
packets are replicated.
A route's action can transition from trap to forward when a RIF is
created for one of the route's egress virtual interfaces (eVIF). When
this happens, the route's action is first updated and only later the
list of egress RIFs is committed to the device.
This results in the route pointing to an invalid list. In case the list
pointer is out of range (due to uninitialized memory), the device will
complain:
mlxsw_spectrum2 0000:06:00.0: EMAD reg access failed (tid=5733bf490000905c,reg_id=300f(pefa),type=write,status=7(bad parameter))
Fix this by first committing the list of egress RIFs to the device and
only later update the route's action.
Note that a fix is not needed in the reverse function (i.e.,
mlxsw_sp_mr_route_evif_unresolve()), as there the route's action is
first updated and only later the RIF is removed from the list.
Cc: stable@vger.kernel.org
Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/20210506072308.3834303-1-idosch@idosch.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/openvswitch')
0 files changed, 0 insertions, 0 deletions