]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix create autogroup prev initializer
authorPaul Blakey <paulb@mellanox.com>
Fri, 10 Mar 2017 12:33:01 +0000 (14:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 18:03:26 +0000 (10:03 -0800)
commit88da2c1fc70f1b2b7833cc426afb46d9a91b2c92
tree6734ebb1323cc5a727ecd5dc8bcbd704a160a854
parentf79d43a550cf84ec970b5a59bcd4b6d6918c1f35
net/mlx5: Fix create autogroup prev initializer

The autogroups list is a list of non overlapping group boundaries
sorted by their start index. If the autogroups list wasn't empty
and an empty group slot was found at the start of the list,
the new group was added to the end of the list instead of the
beginning, as the prev initializer was incorrect.
When this was repeated, it caused multiple groups to have
overlapping boundaries.

Fixed that by correctly initializing the prev pointer to the
start of the list.

Fixes: 456709d31880 ('net/mlx5: Keep autogroups list ordered')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c