netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be2net: Fix to parse RSS hash from Receive completions correctly.
@ 2012-07-26  7:29 sarveshwar.bandi
  2012-07-26  8:14 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: sarveshwar.bandi @ 2012-07-26  7:29 UTC (permalink / raw)
  To: davem; +Cc: netdev, Sarveshwar Bandi

From: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>

Wrong pointer variable is being used to parse the rss hash from
receive completions leading to corrupted rss_hash values filled into skb.

Please apply to net.

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 4d96771..d38bf6c 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1397,7 +1397,7 @@ static void be_parse_rx_compl_v1(struct be_eth_rx_compl *compl,
 	rxcp->pkt_type =
 		AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl);
 	rxcp->rss_hash =
-		AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp);
+		AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, compl);
 	if (rxcp->vlanf) {
 		rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm,
 					  compl);
@@ -1429,7 +1429,7 @@ static void be_parse_rx_compl_v0(struct be_eth_rx_compl *compl,
 	rxcp->pkt_type =
 		AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl);
 	rxcp->rss_hash =
-		AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp);
+		AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, compl);
 	if (rxcp->vlanf) {
 		rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm,
 					  compl);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] be2net: Fix to parse RSS hash from Receive completions correctly.
  2012-07-26  7:29 [PATCH] be2net: Fix to parse RSS hash from Receive completions correctly sarveshwar.bandi
@ 2012-07-26  8:14 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-26  8:14 UTC (permalink / raw)
  To: sarveshwar.bandi; +Cc: netdev

From: <sarveshwar.bandi@emulex.com>
Date: Thu, 26 Jul 2012 12:59:50 +0530

> From: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
> 
> Wrong pointer variable is being used to parse the rss hash from
> receive completions leading to corrupted rss_hash values filled into skb.
> 
> Please apply to net.
  ^^^^^^^^^^^^^^^^^^^^

This doesn't belong in the commit message body, put it after the "---"
demarcation.

> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-26  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-26  7:29 [PATCH] be2net: Fix to parse RSS hash from Receive completions correctly sarveshwar.bandi
2012-07-26  8:14 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).