Wed, Dec 02, 2015 at 06:47:51AM CET, gerlitz...@gmail.com wrote: >On Tue, Dec 1, 2015 at 3:49 PM, Jiri Pirko <j...@resnulli.us> wrote: >> Implement basic procedures for joining/leaving port to/from LAG. That >> includes HW setup of collector, core LAG mapping setup. >> >> Signed-off-by: Jiri Pirko <j...@mellanox.com> >> --- >> drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 284 >> +++++++++++++++++++++++-- >> drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 35 ++- >> 2 files changed, 302 insertions(+), 17 deletions(-) >> >> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > >[...] > >> +static int mlxsw_sp_port_lag_leave(struct mlxsw_sp_port *mlxsw_sp_port, >> + struct net_device *lag_dev) >> +{ >> + struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp; >> + struct mlxsw_sp_upper *lag; >> + u16 lag_id = mlxsw_sp_port->lag_id; >> + int err; >> + >> + if (!mlxsw_sp_port->lagged) >> + return 0; >> + lag = mlxsw_sp_lag_get(mlxsw_sp, lag_id); >> + BUG_ON(lag->ref_count == 0); > >is this a must to crash the system here? can't we do something less drastic?
This can never happen, unless something is seriously wrong with the system (memory corruption, etc). -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html