netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] cxgb4: fix the panic caused by non smac rewrite
@ 2020-11-18 14:32 Raju Rangoju
  2020-11-20 19:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Raju Rangoju @ 2020-11-18 14:32 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, rajur

SMT entry is allocated only when loopback Source MAC
rewriting is requested. Accessing SMT entry for non
smac rewrite cases results in kernel panic.

Fix the panic caused by non smac rewrite

Fixes: 937d84205884 ("cxgb4: set up filter action after rewrites")
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index 4e55f7081644..83b46440408b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -880,7 +880,8 @@ int set_filter_wr(struct adapter *adapter, int fidx)
 		 FW_FILTER_WR_OVLAN_VLD_V(f->fs.val.ovlan_vld) |
 		 FW_FILTER_WR_IVLAN_VLDM_V(f->fs.mask.ivlan_vld) |
 		 FW_FILTER_WR_OVLAN_VLDM_V(f->fs.mask.ovlan_vld));
-	fwr->smac_sel = f->smt->idx;
+	if (f->fs.newsmac)
+		fwr->smac_sel = f->smt->idx;
 	fwr->rx_chan_rx_rpl_iq =
 		htons(FW_FILTER_WR_RX_CHAN_V(0) |
 		      FW_FILTER_WR_RX_RPL_IQ_V(adapter->sge.fw_evtq.abs_id));
-- 
2.9.5


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

* Re: [PATCH net] cxgb4: fix the panic caused by non smac rewrite
  2020-11-18 14:32 [PATCH net] cxgb4: fix the panic caused by non smac rewrite Raju Rangoju
@ 2020-11-20 19:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-11-20 19:10 UTC (permalink / raw)
  To: Raju Rangoju; +Cc: netdev, davem, kuba

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed, 18 Nov 2020 20:02:13 +0530 you wrote:
> SMT entry is allocated only when loopback Source MAC
> rewriting is requested. Accessing SMT entry for non
> smac rewrite cases results in kernel panic.
> 
> Fix the panic caused by non smac rewrite
> 
> Fixes: 937d84205884 ("cxgb4: set up filter action after rewrites")
> Signed-off-by: Raju Rangoju <rajur@chelsio.com>
> 
> [...]

Here is the summary with links:
  - [net] cxgb4: fix the panic caused by non smac rewrite
    https://git.kernel.org/netdev/net/c/bff453921ae1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2020-11-20 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 14:32 [PATCH net] cxgb4: fix the panic caused by non smac rewrite Raju Rangoju
2020-11-20 19:10 ` patchwork-bot+netdevbpf

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).