]> git.hungrycats.org Git - linux/commit
net/mlx4: Fix the check in attaching steering rules
authorTalat Batheesh <talatb@mellanox.com>
Sun, 4 Jun 2017 11:30:07 +0000 (14:30 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Aug 2017 01:14:50 +0000 (02:14 +0100)
commitd3d010b3f4a920ca76f4bc96b67a18dfc3e24b06
treee0906bc8db6dc0de507d5df24845eac9a352a3b3
parent14216e1b76cc041165baefa18bfa6af229f863b3
net/mlx4: Fix the check in attaching steering rules

commit 6dc06c08bef1c746ff8da33dab677cfbacdcad32 upstream.

Our previous patch (cited below) introduced a regression
for RAW Eth QPs.

Fix it by checking if the QP number provided by user-space
exists, hence allowing steering rules to be added for valid
QPs only.

Fixes: 89c557687a32 ("net/mlx4_en: Avoid adding steering rules with invalid ring")
Reported-by: Or Gerlitz <gerlitz.or@gmail.com>
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/mcg.c
drivers/net/ethernet/mellanox/mlx4/qp.c
include/linux/mlx4/qp.h