* [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
@ 2016-04-18 22:45 Jacob Keller
2016-05-31 18:07 ` Singh, Krishneil K
2016-05-31 18:08 ` Singh, Krishneil K
0 siblings, 2 replies; 3+ messages in thread
From: Jacob Keller @ 2016-04-18 22:45 UTC (permalink / raw)
To: intel-wired-lan
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)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
Notes:
Jeff, this needs to be squashed into "[v1,1/4] fm10k: fix possible null pointer
deref after kcalloc", and I am sending it this way since you requested I work
only at the top if the queue for now.
- v2
* Fix checkpatch warning
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 9c0d87503977..9b5195435c87 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -983,9 +983,10 @@ void fm10k_write_reta(struct fm10k_intfc *interface, const u32 *indir)
/* 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;
}
--
2.8.1.371.g31c5d55
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
2016-04-18 22:45 [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta Jacob Keller
@ 2016-05-31 18:07 ` Singh, Krishneil K
2016-05-31 18:08 ` Singh, Krishneil K
1 sibling, 0 replies; 3+ messages in thread
From: Singh, Krishneil K @ 2016-05-31 18:07 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Monday, April 18, 2016 3:45 PM
To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
Subject: [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
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)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
2016-04-18 22:45 [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta Jacob Keller
2016-05-31 18:07 ` Singh, Krishneil K
@ 2016-05-31 18:08 ` Singh, Krishneil K
1 sibling, 0 replies; 3+ messages in thread
From: Singh, Krishneil K @ 2016-05-31 18:08 UTC (permalink / raw)
To: intel-wired-lan
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Monday, April 18, 2016 3:45 PM
To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
Subject: [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta
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)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-31 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18 22:45 [Intel-wired-lan] [PATCH v2] fm10k: fix incorrect index calculation in fm10k_write_reta Jacob Keller
2016-05-31 18:07 ` Singh, Krishneil K
2016-05-31 18:08 ` Singh, Krishneil K
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.