Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:08:48 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:09:48 +0100
commit046093f1f478b817c1df93e0f0a2c02404605894 (patch)
treeb5ebe0b770660c55a8ad70977a17df0af0499061
parent5a3b1528d3e04fc4addda7515ecf2011381bc30b (diff)
net/mlx5: Fix NULL pointer dereference in extended destination
(jsc#SLE-8464).
-rw-r--r--patches.suse/net-mlx5-Fix-NULL-pointer-dereference-in-extended-de.patch32
-rw-r--r--series.conf1
2 files changed, 33 insertions, 0 deletions
diff --git a/patches.suse/net-mlx5-Fix-NULL-pointer-dereference-in-extended-de.patch b/patches.suse/net-mlx5-Fix-NULL-pointer-dereference-in-extended-de.patch
new file mode 100644
index 0000000000..710397976f
--- /dev/null
+++ b/patches.suse/net-mlx5-Fix-NULL-pointer-dereference-in-extended-de.patch
@@ -0,0 +1,32 @@
+From: Eli Britstein <elibr@mellanox.com>
+Date: Tue, 15 Oct 2019 12:44:18 +0000
+Subject: net/mlx5: Fix NULL pointer dereference in extended destination
+Patch-mainline: v5.4-rc6
+Git-commit: 0fd79b1e17bec8460039f6bdb57163a0442110d9
+References: jsc#SLE-8464
+
+The cited commit refactored the encap id into a struct pointed from the
+destination.
+Bug fix for the case there is no encap for one of the destinations.
+
+Fixes: 2b688ea5efde ("net/mlx5: Add flow steering actions to fs_cmd shim layer")
+Signed-off-by: Eli Britstein <elibr@mellanox.com>
+Reviewed-by: Roi Dayan <roid@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+@@ -507,7 +507,8 @@ static int mlx5_cmd_set_fte(struct mlx5_
+ MLX5_SET(dest_format_struct, in_dests,
+ destination_eswitch_owner_vhca_id,
+ dst->dest_attr.vport.vhca_id);
+- if (extended_dest) {
++ if (extended_dest &&
++ dst->dest_attr.vport.pkt_reformat) {
+ MLX5_SET(dest_format_struct, in_dests,
+ packet_reformat,
+ !!(dst->dest_attr.vport.flags &
diff --git a/series.conf b/series.conf
index 68e0e6f0a8..11f92ad004 100644
--- a/series.conf
+++ b/series.conf
@@ -2876,6 +2876,7 @@
patches.suse/net-mlx5e-Replace-kfree-with-kvfree-when-free-vhca-s.patch
patches.suse/net-mlx5e-Only-skip-encap-flows-update-when-encap-in.patch
patches.suse/net-mlx5-Fix-rtable-reference-leak.patch
+ patches.suse/net-mlx5-Fix-NULL-pointer-dereference-in-extended-de.patch
patches.suse/powerpc-powernv-Fix-CPU-idle-to-be-called-with-IRQs-.patch
patches.suse/scsi-qla2xxx-fixup-incorrect-usage-of-host_byte.patch
patches.suse/scsi-lpfc-Check-queue-pointer-before-use.patch