Skip to contentSkip to conversation

Patch "fm10k: fix incorrect index calculation in fm10k_write_reta" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Oct 5, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

fm10k: fix incorrect index calculation in fm10k_write_reta

to the 4.7-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:
fm10k-fix-incorrect-index-calculation-in-fm10k_write_reta.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 34875887f360d7bd0b7f0a89f7c6d65eca616ee3 Mon Sep 17 00:00:00 2001

From: Jacob Keller <[email protected]>
Date: Mon, 18 Apr 2016 15:45:00 -0700
Subject: fm10k: fix incorrect index calculation in fm10k_write_reta

From: Jacob Keller <[email protected]>

commit 34875887f360d7bd0b7f0a89f7c6d65eca616ee3 upstream.

The index calculated when looping through the indir array passed to fm10k_write_reta was incorrectly calculated as the first part i needs to be multiplied by 4.

Fixes 0cfea7a65738 ("fm10k: fix possible null pointer deref after kcalloc", 2016-04-13)
---
 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +3 -2
@@ -983,9 +983,10 @@ void fm10k_write_reta(struct fm10k_intfc
 		/* generate a new table if we weren't given one */
 		for (j = 0; j < 4; j++) {
 			if (indir)
-				n = indir[i + j];
+				n = indir[4 * i + j];
 			else
-				n = ethtool_rxfh_indir_default(i + j, rss_i);
+				n = ethtool_rxfh_indir_default(4 * i + j,
+							       rss_i);
 
 			table[j] = n;
 		}

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/fm10k-fix-incorrect-index-calculation-in-fm10k_write_reta.patch