All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net/mlx4_en: Avoid adding steering rules with invalid ring" has been added to the 4.4-stable tree
@ 2018-04-10  9:05 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-04-10  9:05 UTC (permalink / raw)
  To: talatb, alexander.levin, davem, gregkh, tariqt; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net/mlx4_en: Avoid adding steering rules with invalid ring

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx4_en-avoid-adding-steering-rules-with-invalid-ring.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Tue Apr 10 10:31:53 CEST 2018
From: Talat Batheesh <talatb@mellanox.com>
Date: Tue, 9 May 2017 14:45:23 +0300
Subject: net/mlx4_en: Avoid adding steering rules with invalid ring

From: Talat Batheesh <talatb@mellanox.com>


[ Upstream commit 89c557687a32c294e9d25670a96e9287c09f2d5f ]

Inserting steering rules with illegal ring is an invalid operation,
block it.

Fixes: 820672812f82 ('net/mlx4_en: Manage flow steering rules with ethtool')
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -1513,6 +1513,11 @@ static int mlx4_en_flow_replace(struct n
 		qpn = priv->drop_qp.qpn;
 	else if (cmd->fs.ring_cookie & EN_ETHTOOL_QP_ATTACH) {
 		qpn = cmd->fs.ring_cookie & (EN_ETHTOOL_QP_ATTACH - 1);
+		if (qpn < priv->rss_map.base_qpn ||
+		    qpn >= priv->rss_map.base_qpn + priv->rx_ring_num) {
+			en_warn(priv, "rxnfc: QP (0x%x) doesn't exist\n", qpn);
+			return -EINVAL;
+		}
 	} else {
 		if (cmd->fs.ring_cookie >= priv->rx_ring_num) {
 			en_warn(priv, "rxnfc: RX ring (%llu) doesn't exist\n",


Patches currently in stable-queue which might be from talatb@mellanox.com are

queue-4.4/net-mlx4_en-avoid-adding-steering-rules-with-invalid-ring.patch
queue-4.4/net-mlx4-fix-the-check-in-attaching-steering-rules.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-10  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10  9:05 Patch "net/mlx4_en: Avoid adding steering rules with invalid ring" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.